diff --git a/sdk/advisor/ci.mgmt.yml b/sdk/advisor/ci.mgmt.yml index 6b9f8d6952e6..22df99de35f2 100644 --- a/sdk/advisor/ci.mgmt.yml +++ b/sdk/advisor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/advisor/ci.mgmt.yml - sdk/advisor/Azure.ResourceManager.Advisor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/advisor/ci.mgmt.yml + - sdk/advisor/Azure.ResourceManager.Advisor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/agrifood/ci.mgmt.yml b/sdk/agrifood/ci.mgmt.yml index ee27d71f9495..03a5f6399ccb 100644 --- a/sdk/agrifood/ci.mgmt.yml +++ b/sdk/agrifood/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/agrifood/ci.mgmt.yml - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/agrifood/ci.mgmt.yml + - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/alertsmanagement/ci.mgmt.yml b/sdk/alertsmanagement/ci.mgmt.yml index f33a90fffe5c..ad3a8d3d1efd 100644 --- a/sdk/alertsmanagement/ci.mgmt.yml +++ b/sdk/alertsmanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/alertsmanagement/ci.mgmt.yml - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/alertsmanagement/ci.mgmt.yml + - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/analysisservices/ci.mgmt.yml b/sdk/analysisservices/ci.mgmt.yml index 33729b962d88..d3774b358380 100644 --- a/sdk/analysisservices/ci.mgmt.yml +++ b/sdk/analysisservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/analysisservices/ci.mgmt.yml - sdk/analysisservices/Azure.ResourceManager.Analysis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/analysisservices/ci.mgmt.yml + - sdk/analysisservices/Azure.ResourceManager.Analysis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/apicenter/ci.mgmt.yml b/sdk/apicenter/ci.mgmt.yml index 41c037327e33..4882d4409c0b 100644 --- a/sdk/apicenter/ci.mgmt.yml +++ b/sdk/apicenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/apicenter/ci.mgmt.yml - sdk/apicenter/Azure.ResourceManager.ApiCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/apicenter/ci.mgmt.yml + - sdk/apicenter/Azure.ResourceManager.ApiCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/apimanagement/ci.mgmt.yml b/sdk/apimanagement/ci.mgmt.yml index b72c80a2e0e6..2f766edb9528 100644 --- a/sdk/apimanagement/ci.mgmt.yml +++ b/sdk/apimanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/apimanagement/ci.mgmt.yml - sdk/apimanagement/Azure.ResourceManager.ApiManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/apimanagement/ci.mgmt.yml + - sdk/apimanagement/Azure.ResourceManager.ApiManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/appcomplianceautomation/ci.mgmt.yml b/sdk/appcomplianceautomation/ci.mgmt.yml index d8a31e0139a8..7c3b00d97c17 100644 --- a/sdk/appcomplianceautomation/ci.mgmt.yml +++ b/sdk/appcomplianceautomation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/appcomplianceautomation/ci.mgmt.yml - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appcomplianceautomation/ci.mgmt.yml + - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/appconfiguration/ci.mgmt.yml b/sdk/appconfiguration/ci.mgmt.yml index a883eaefcd59..e53dd63aca0f 100644 --- a/sdk/appconfiguration/ci.mgmt.yml +++ b/sdk/appconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/appconfiguration/ci.mgmt.yml - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appconfiguration/ci.mgmt.yml + - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/ + # These comments should stay. extends: diff --git a/sdk/applicationinsights/ci.mgmt.yml b/sdk/applicationinsights/ci.mgmt.yml index af82b66e6952..361f4019d322 100644 --- a/sdk/applicationinsights/ci.mgmt.yml +++ b/sdk/applicationinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/applicationinsights/ci.mgmt.yml - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/applicationinsights/ci.mgmt.yml + - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/appplatform/ci.mgmt.yml b/sdk/appplatform/ci.mgmt.yml index 1d28b9352b6c..023cebeb8d71 100644 --- a/sdk/appplatform/ci.mgmt.yml +++ b/sdk/appplatform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/appplatform/ci.mgmt.yml - sdk/appplatform/Azure.ResourceManager.AppPlatform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appplatform/ci.mgmt.yml + - sdk/appplatform/Azure.ResourceManager.AppPlatform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/arc-scvmm/ci.mgmt.yml b/sdk/arc-scvmm/ci.mgmt.yml index bbc2db0c9f63..53438df9d332 100644 --- a/sdk/arc-scvmm/ci.mgmt.yml +++ b/sdk/arc-scvmm/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/arc-scvmm/ci.mgmt.yml - sdk/arc-scvmm/Azure.ResourceManager.ScVmm/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/arc-scvmm/ci.mgmt.yml + - sdk/arc-scvmm/Azure.ResourceManager.ScVmm/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/astronomer/ci.mgmt.yml b/sdk/astronomer/ci.mgmt.yml index f6099036651c..d0de6d52b29a 100644 --- a/sdk/astronomer/ci.mgmt.yml +++ b/sdk/astronomer/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/astronomer/ci.mgmt.yml - sdk/astronomer/Azure.ResourceManager.Astro/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/astronomer/ci.mgmt.yml + - sdk/astronomer/Azure.ResourceManager.Astro/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/attestation/ci.mgmt.yml b/sdk/attestation/ci.mgmt.yml index 51d1ac0c8240..595f887b2c35 100644 --- a/sdk/attestation/ci.mgmt.yml +++ b/sdk/attestation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/attestation/ci.mgmt.yml - sdk/attestation/Azure.ResourceManager.Attestation/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/attestation/ci.mgmt.yml + - sdk/attestation/Azure.ResourceManager.Attestation/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/authorization/ci.mgmt.yml b/sdk/authorization/ci.mgmt.yml index 7ac32fcc5543..9c9d9638348d 100644 --- a/sdk/authorization/ci.mgmt.yml +++ b/sdk/authorization/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/authorization/ci.mgmt.yml - sdk/authorization/Azure.ResourceManager.Authorization/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/authorization/ci.mgmt.yml + - sdk/authorization/Azure.ResourceManager.Authorization/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/automanage/ci.mgmt.yml b/sdk/automanage/ci.mgmt.yml index 5a2467820b85..8e45b6506aa8 100644 --- a/sdk/automanage/ci.mgmt.yml +++ b/sdk/automanage/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/automanage/ci.mgmt.yml - sdk/automanage/Azure.ResourceManager.Automanage/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/automanage/ci.mgmt.yml + - sdk/automanage/Azure.ResourceManager.Automanage/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/automation/ci.mgmt.yml b/sdk/automation/ci.mgmt.yml index 45bec5d1c196..b2cb0f44bf22 100644 --- a/sdk/automation/ci.mgmt.yml +++ b/sdk/automation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/automation/ci.mgmt.yml - sdk/automation/Azure.ResourceManager.Automation/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/automation/ci.mgmt.yml + - sdk/automation/Azure.ResourceManager.Automation/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/avs/ci.mgmt.yml b/sdk/avs/ci.mgmt.yml index 6404a2ba34ce..7030303dc9f4 100644 --- a/sdk/avs/ci.mgmt.yml +++ b/sdk/avs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/avs/ci.mgmt.yml - sdk/avs/Azure.ResourceManager.Avs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/avs/ci.mgmt.yml + - sdk/avs/Azure.ResourceManager.Avs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/azurelargeinstance/ci.mgmt.yml b/sdk/azurelargeinstance/ci.mgmt.yml index fbe98927ef15..d9425419d2c3 100644 --- a/sdk/azurelargeinstance/ci.mgmt.yml +++ b/sdk/azurelargeinstance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/azurelargeinstance/ci.mgmt.yml - sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/azurelargeinstance/ci.mgmt.yml + - sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/azurestackhci/ci.mgmt.yml b/sdk/azurestackhci/ci.mgmt.yml index 89c22080e00c..167241c22e36 100644 --- a/sdk/azurestackhci/ci.mgmt.yml +++ b/sdk/azurestackhci/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/azurestackhci/ci.mgmt.yml - sdk/azurestackhci/Azure.ResourceManager.Hci/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/azurestackhci/ci.mgmt.yml + - sdk/azurestackhci/Azure.ResourceManager.Hci/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.net8.0.cs b/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.net8.0.cs index 94a098ec1bb7..f2e7a58ec245 100644 --- a/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.net8.0.cs +++ b/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.net8.0.cs @@ -231,10 +231,14 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Response CreateTaskCollection(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateTaskCollectionAsync(string jobId, Azure.Compute.Batch.BatchTaskGroup taskCollection, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateTaskCollectionAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeallocateNode(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDeallocateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeallocateNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDeallocateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteNodeUser(string poolId, string nodeId, string userName, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } @@ -389,6 +393,10 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Response RebootNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task RebootNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeRebootContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RebootNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReimageNode(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeReimageContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReimageNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReimageNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeReimageContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReimageNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response RemoveNodes(string poolId, Azure.Compute.Batch.BatchNodeRemoveContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveNodes(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task RemoveNodesAsync(string poolId, Azure.Compute.Batch.BatchNodeRemoveContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -417,14 +425,16 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Response ResizePool(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task ResizePoolAsync(string poolId, Azure.Compute.Batch.BatchPoolResizeContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResizePoolAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response StartNode(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task StartNodeAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response StopPoolResize(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task StopPoolResizeAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response TerminateJob(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response TerminateJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateJob(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response TerminateJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response TerminateTask(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task TerminateTaskAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response UpdateJob(string jobId, Azure.Compute.Batch.BatchJobUpdateContent job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -446,10 +456,10 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A } public partial class BatchClientOptions : Azure.Core.ClientOptions { - public BatchClientOptions(Azure.Compute.Batch.BatchClientOptions.ServiceVersion version = Azure.Compute.Batch.BatchClientOptions.ServiceVersion.V2024_02_01_19_0) { } + public BatchClientOptions(Azure.Compute.Batch.BatchClientOptions.ServiceVersion version = Azure.Compute.Batch.BatchClientOptions.ServiceVersion.V2024_07_01_20_0) { } public enum ServiceVersion { - V2024_02_01_19_0 = 1, + V2024_07_01_20_0 = 1, } } public partial class BatchError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -643,7 +653,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class BatchJobNetworkConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BatchJobNetworkConfiguration(string subnetId) { } + public BatchJobNetworkConfiguration(string subnetId, bool skipWithdrawFromVNet) { } + public bool SkipWithdrawFromVNet { get { throw null; } set { } } public string SubnetId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Compute.Batch.BatchJobNetworkConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1009,6 +1020,7 @@ public BatchJobUpdateContent() { } public Azure.Compute.Batch.BatchJobConstraints Constraints { get { throw null; } set { } } public int? MaxParallelTasks { get { throw null; } set { } } public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobNetworkConfiguration NetworkConfiguration { get { throw null; } set { } } public Azure.Compute.Batch.OnAllBatchTasksComplete? OnAllTasksComplete { get { throw null; } set { } } public Azure.Compute.Batch.BatchPoolInfo PoolInfo { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } @@ -1086,6 +1098,8 @@ public partial class BatchNodeCounts : System.ClientModel.Primitives.IJsonModel< { internal BatchNodeCounts() { } public int Creating { get { throw null; } } + public int Deallocated { get { throw null; } } + public int Deallocating { get { throw null; } } public int Idle { get { throw null; } } public int LeavingPool { get { throw null; } } public int Offline { get { throw null; } } @@ -1107,6 +1121,37 @@ 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 BatchNodeDeallocateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeDeallocateContent() { } + public Azure.Compute.Batch.BatchNodeDeallocateOption? NodeDeallocateOption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeDeallocateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeDeallocateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 BatchNodeDeallocateOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeDeallocateOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeDeallocateOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocateOption RetainedData { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocateOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocateOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeDeallocateOption 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.Compute.Batch.BatchNodeDeallocateOption left, Azure.Compute.Batch.BatchNodeDeallocateOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeDeallocateOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeDeallocateOption left, Azure.Compute.Batch.BatchNodeDeallocateOption right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BatchNodeDeallocationOption : System.IEquatable { @@ -1300,6 +1345,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.Compute.Batch.BatchNodeRebootOption left, Azure.Compute.Batch.BatchNodeRebootOption right) { throw null; } public override string ToString() { throw null; } } + public partial class BatchNodeReimageContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeReimageContent() { } + public Azure.Compute.Batch.BatchNodeReimageOption? NodeReimageOption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeReimageContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeReimageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 BatchNodeReimageOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeReimageOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeReimageOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeReimageOption RetainedData { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeReimageOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeReimageOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeReimageOption 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.Compute.Batch.BatchNodeReimageOption left, Azure.Compute.Batch.BatchNodeReimageOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeReimageOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeReimageOption left, Azure.Compute.Batch.BatchNodeReimageOption right) { throw null; } + public override string ToString() { throw null; } + } public partial class BatchNodeRemoteLoginSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal BatchNodeRemoteLoginSettings() { } @@ -1332,6 +1408,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public BatchNodeState(string value) { throw null; } public static Azure.Compute.Batch.BatchNodeState Creating { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Deallocated { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Deallocating { get { throw null; } } public static Azure.Compute.Batch.BatchNodeState Idle { get { throw null; } } public static Azure.Compute.Batch.BatchNodeState LeavingPool { get { throw null; } } public static Azure.Compute.Batch.BatchNodeState Offline { get { throw null; } } @@ -1701,9 +1779,20 @@ public partial class BatchPoolUpdateContent : System.ClientModel.Primitives.IJso { public BatchPoolUpdateContent() { } public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + public bool? EnableInterNodeCommunication { get { throw null; } set { } } public System.Collections.Generic.IList Metadata { get { throw null; } } + public System.Collections.Generic.IList MountConfiguration { get { throw null; } } + public Azure.Compute.Batch.NetworkConfiguration NetworkConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ResourceTags { get { throw null; } } public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } set { } } public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskSchedulingPolicy TaskSchedulingPolicy { get { throw null; } set { } } + public int? TaskSlotsPerNode { get { throw null; } set { } } + public Azure.Compute.Batch.UpgradePolicy UpgradePolicy { get { throw null; } set { } } + public System.Collections.Generic.IList UserAccounts { get { throw null; } } + public Azure.Compute.Batch.VirtualMachineConfiguration VirtualMachineConfiguration { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Compute.Batch.BatchPoolUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1962,6 +2051,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class BatchTaskContainerSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BatchTaskContainerSettings(string imageName) { } + public System.Collections.Generic.IList ContainerHostBatchBindMounts { get { throw null; } } public string ContainerRunOptions { get { throw null; } set { } } public string ImageName { get { throw null; } set { } } public Azure.Compute.Batch.ContainerRegistryReference Registry { get { throw null; } set { } } @@ -2252,7 +2342,7 @@ public static partial class ComputeBatchModelFactory public static Azure.Compute.Batch.BatchJobStatistics BatchJobStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, long numSucceededTasks = (long)0, long numFailedTasks = (long)0, long numTaskRetries = (long)0, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } public static Azure.Compute.Batch.BatchNode BatchNode(string id = null, string url = null, Azure.Compute.Batch.BatchNodeState? state = default(Azure.Compute.Batch.BatchNodeState?), Azure.Compute.Batch.SchedulingState? schedulingState = default(Azure.Compute.Batch.SchedulingState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastBootTime = default(System.DateTimeOffset?), System.DateTimeOffset? allocationTime = default(System.DateTimeOffset?), string ipAddress = null, string affinityId = null, string vmSize = null, int? totalTasksRun = default(int?), int? runningTasksCount = default(int?), int? runningTaskSlotsCount = default(int?), int? totalTasksSucceeded = default(int?), System.Collections.Generic.IEnumerable recentTasks = null, Azure.Compute.Batch.BatchStartTask startTask = null, Azure.Compute.Batch.BatchStartTaskInfo startTaskInfo = null, System.Collections.Generic.IEnumerable errors = null, bool? isDedicated = default(bool?), Azure.Compute.Batch.BatchNodeEndpointConfiguration endpointConfiguration = null, Azure.Compute.Batch.BatchNodeAgentInfo nodeAgentInfo = null, Azure.Compute.Batch.VirtualMachineInfo virtualMachineInfo = null) { throw null; } public static Azure.Compute.Batch.BatchNodeAgentInfo BatchNodeAgentInfo(string version = null, System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset)) { throw null; } - public static Azure.Compute.Batch.BatchNodeCounts BatchNodeCounts(int creating = 0, int idle = 0, int offline = 0, int preempted = 0, int rebooting = 0, int reimaging = 0, int running = 0, int starting = 0, int startTaskFailed = 0, int leavingPool = 0, int unknown = 0, int unusable = 0, int waitingForStartTask = 0, int total = 0, int upgradingOs = 0) { throw null; } + public static Azure.Compute.Batch.BatchNodeCounts BatchNodeCounts(int creating = 0, int idle = 0, int offline = 0, int preempted = 0, int rebooting = 0, int reimaging = 0, int running = 0, int starting = 0, int startTaskFailed = 0, int leavingPool = 0, int unknown = 0, int unusable = 0, int waitingForStartTask = 0, int deallocated = 0, int deallocating = 0, int total = 0, int upgradingOs = 0) { throw null; } public static Azure.Compute.Batch.BatchNodeEndpointConfiguration BatchNodeEndpointConfiguration(System.Collections.Generic.IEnumerable inboundEndpoints = null) { throw null; } public static Azure.Compute.Batch.BatchNodeError BatchNodeError(string code = null, string message = null, System.Collections.Generic.IEnumerable errorDetails = null) { throw null; } public static Azure.Compute.Batch.BatchNodeFile BatchNodeFile(string name = null, string url = null, bool? isDirectory = default(bool?), Azure.Compute.Batch.FileProperties properties = null) { throw null; } @@ -2283,8 +2373,8 @@ public static partial class ComputeBatchModelFactory public static Azure.Compute.Batch.BatchTaskInfo BatchTaskInfo(string taskUrl = null, string jobId = null, string taskId = null, int? subtaskId = default(int?), Azure.Compute.Batch.BatchTaskState taskState = default(Azure.Compute.Batch.BatchTaskState), Azure.Compute.Batch.BatchTaskExecutionInfo executionInfo = null) { throw null; } public static Azure.Compute.Batch.BatchTaskSlotCounts BatchTaskSlotCounts(int active = 0, int running = 0, int completed = 0, int succeeded = 0, int failed = 0) { throw null; } public static Azure.Compute.Batch.BatchTaskStatistics BatchTaskStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } - public static Azure.Compute.Batch.FileProperties FileProperties(System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), System.DateTimeOffset lastModified = default(System.DateTimeOffset), long contentLength = (long)0, string contentType = null, string fileMode = null) { throw null; } - public static Azure.Compute.Batch.ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null) { throw null; } + public static Azure.Compute.Batch.FileProperties FileProperties(System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), System.DateTimeOffset lastModified = default(System.DateTimeOffset), string contentLength = null, string contentType = null, string fileMode = null) { throw null; } + public static Azure.Compute.Batch.ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null, string sharedGalleryImageId = null, string communityGalleryImageId = null) { throw null; } public static Azure.Compute.Batch.InboundEndpoint InboundEndpoint(string name = null, Azure.Compute.Batch.InboundEndpointProtocol protocol = default(Azure.Compute.Batch.InboundEndpointProtocol), string publicIpAddress = null, string publicFQDN = null, int frontendPort = 0, int backendPort = 0) { throw null; } public static Azure.Compute.Batch.InstanceViewStatus InstanceViewStatus(string code = null, string displayStatus = null, Azure.Compute.Batch.StatusLevelTypes? level = default(Azure.Compute.Batch.StatusLevelTypes?), string message = null, System.DateTimeOffset? time = default(System.DateTimeOffset?)) { throw null; } public static Azure.Compute.Batch.NameValuePair NameValuePair(string name = null, string value = null) { throw null; } @@ -2309,6 +2399,40 @@ 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 ContainerHostBatchBindMountEntry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerHostBatchBindMountEntry() { } + public bool? IsReadOnly { get { throw null; } set { } } + public Azure.Compute.Batch.ContainerHostDataPath? Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ContainerHostBatchBindMountEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ContainerHostBatchBindMountEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ContainerHostDataPath : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerHostDataPath(string value) { throw null; } + public static Azure.Compute.Batch.ContainerHostDataPath Applications { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath JobPrep { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath Shared { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath Startup { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath Task { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath VfsMounts { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ContainerHostDataPath 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.Compute.Batch.ContainerHostDataPath left, Azure.Compute.Batch.ContainerHostDataPath right) { throw null; } + public static implicit operator Azure.Compute.Batch.ContainerHostDataPath (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ContainerHostDataPath left, Azure.Compute.Batch.ContainerHostDataPath right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerRegistryReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryReference() { } @@ -2588,7 +2712,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class FileProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FileProperties() { } - public long ContentLength { get { throw null; } } + public string ContentLength { get { throw null; } } public string ContentType { get { throw null; } } public System.DateTimeOffset? CreationTime { get { throw null; } } public string FileMode { get { throw null; } } @@ -2615,9 +2739,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ImageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ImageReference() { } + public string CommunityGalleryImageId { get { throw null; } set { } } public string ExactVersion { get { throw null; } } public string Offer { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + public string SharedGalleryImageId { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } public string VirtualMachineImageId { get { throw null; } set { } } @@ -2763,8 +2889,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ManagedDisk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ManagedDisk(Azure.Compute.Batch.StorageAccountType storageAccountType) { } - public Azure.Compute.Batch.StorageAccountType StorageAccountType { get { throw null; } set { } } + public ManagedDisk() { } + public Azure.Compute.Batch.VMDiskSecurityProfile SecurityProfile { get { throw null; } set { } } + public Azure.Compute.Batch.StorageAccountType? StorageAccountType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Compute.Batch.ManagedDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3109,6 +3236,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.Compute.Batch.SchedulingState left, Azure.Compute.Batch.SchedulingState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecurityEncryptionTypes : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecurityEncryptionTypes(string value) { throw null; } + public static Azure.Compute.Batch.SecurityEncryptionTypes NonPersistedTPM { get { throw null; } } + public static Azure.Compute.Batch.SecurityEncryptionTypes VMGuestStateOnly { get { throw null; } } + public bool Equals(Azure.Compute.Batch.SecurityEncryptionTypes 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.Compute.Batch.SecurityEncryptionTypes left, Azure.Compute.Batch.SecurityEncryptionTypes right) { throw null; } + public static implicit operator Azure.Compute.Batch.SecurityEncryptionTypes (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.SecurityEncryptionTypes left, Azure.Compute.Batch.SecurityEncryptionTypes right) { throw null; } + public override string ToString() { throw null; } + } public partial class SecurityProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecurityProfile(bool encryptionAtHost, Azure.Compute.Batch.SecurityTypes securityType, Azure.Compute.Batch.UefiSettings uefiSettings) { } @@ -3128,6 +3273,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public SecurityTypes(string value) { throw null; } + public static Azure.Compute.Batch.SecurityTypes ConfidentialVM { get { throw null; } } public static Azure.Compute.Batch.SecurityTypes TrustedLaunch { get { throw null; } } public bool Equals(Azure.Compute.Batch.SecurityTypes other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3332,6 +3478,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 VMDiskSecurityProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMDiskSecurityProfile() { } + public Azure.Compute.Batch.SecurityEncryptionTypes? SecurityEncryptionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VMDiskSecurityProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VMDiskSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VMExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VMExtension(string name, string publisher, string type) { } diff --git a/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs b/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs index 94a098ec1bb7..f2e7a58ec245 100644 --- a/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs +++ b/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs @@ -231,10 +231,14 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Response CreateTaskCollection(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateTaskCollectionAsync(string jobId, Azure.Compute.Batch.BatchTaskGroup taskCollection, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateTaskCollectionAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeallocateNode(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDeallocateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeallocateNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDeallocateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteNodeUser(string poolId, string nodeId, string userName, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } @@ -389,6 +393,10 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Response RebootNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task RebootNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeRebootContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RebootNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReimageNode(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeReimageContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReimageNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReimageNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeReimageContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReimageNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response RemoveNodes(string poolId, Azure.Compute.Batch.BatchNodeRemoveContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveNodes(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task RemoveNodesAsync(string poolId, Azure.Compute.Batch.BatchNodeRemoveContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -417,14 +425,16 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A public virtual Azure.Response ResizePool(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task ResizePoolAsync(string poolId, Azure.Compute.Batch.BatchPoolResizeContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResizePoolAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response StartNode(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task StartNodeAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response StopPoolResize(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task StopPoolResizeAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response TerminateJob(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response TerminateJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateJob(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response TerminateJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? force = default(bool?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response TerminateTask(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task TerminateTaskAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response UpdateJob(string jobId, Azure.Compute.Batch.BatchJobUpdateContent job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -446,10 +456,10 @@ public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A } public partial class BatchClientOptions : Azure.Core.ClientOptions { - public BatchClientOptions(Azure.Compute.Batch.BatchClientOptions.ServiceVersion version = Azure.Compute.Batch.BatchClientOptions.ServiceVersion.V2024_02_01_19_0) { } + public BatchClientOptions(Azure.Compute.Batch.BatchClientOptions.ServiceVersion version = Azure.Compute.Batch.BatchClientOptions.ServiceVersion.V2024_07_01_20_0) { } public enum ServiceVersion { - V2024_02_01_19_0 = 1, + V2024_07_01_20_0 = 1, } } public partial class BatchError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -643,7 +653,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class BatchJobNetworkConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BatchJobNetworkConfiguration(string subnetId) { } + public BatchJobNetworkConfiguration(string subnetId, bool skipWithdrawFromVNet) { } + public bool SkipWithdrawFromVNet { get { throw null; } set { } } public string SubnetId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Compute.Batch.BatchJobNetworkConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1009,6 +1020,7 @@ public BatchJobUpdateContent() { } public Azure.Compute.Batch.BatchJobConstraints Constraints { get { throw null; } set { } } public int? MaxParallelTasks { get { throw null; } set { } } public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobNetworkConfiguration NetworkConfiguration { get { throw null; } set { } } public Azure.Compute.Batch.OnAllBatchTasksComplete? OnAllTasksComplete { get { throw null; } set { } } public Azure.Compute.Batch.BatchPoolInfo PoolInfo { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } @@ -1086,6 +1098,8 @@ public partial class BatchNodeCounts : System.ClientModel.Primitives.IJsonModel< { internal BatchNodeCounts() { } public int Creating { get { throw null; } } + public int Deallocated { get { throw null; } } + public int Deallocating { get { throw null; } } public int Idle { get { throw null; } } public int LeavingPool { get { throw null; } } public int Offline { get { throw null; } } @@ -1107,6 +1121,37 @@ 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 BatchNodeDeallocateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeDeallocateContent() { } + public Azure.Compute.Batch.BatchNodeDeallocateOption? NodeDeallocateOption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeDeallocateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeDeallocateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 BatchNodeDeallocateOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeDeallocateOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeDeallocateOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocateOption RetainedData { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocateOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocateOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeDeallocateOption 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.Compute.Batch.BatchNodeDeallocateOption left, Azure.Compute.Batch.BatchNodeDeallocateOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeDeallocateOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeDeallocateOption left, Azure.Compute.Batch.BatchNodeDeallocateOption right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BatchNodeDeallocationOption : System.IEquatable { @@ -1300,6 +1345,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.Compute.Batch.BatchNodeRebootOption left, Azure.Compute.Batch.BatchNodeRebootOption right) { throw null; } public override string ToString() { throw null; } } + public partial class BatchNodeReimageContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeReimageContent() { } + public Azure.Compute.Batch.BatchNodeReimageOption? NodeReimageOption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeReimageContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeReimageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 BatchNodeReimageOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeReimageOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeReimageOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeReimageOption RetainedData { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeReimageOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeReimageOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeReimageOption 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.Compute.Batch.BatchNodeReimageOption left, Azure.Compute.Batch.BatchNodeReimageOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeReimageOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeReimageOption left, Azure.Compute.Batch.BatchNodeReimageOption right) { throw null; } + public override string ToString() { throw null; } + } public partial class BatchNodeRemoteLoginSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal BatchNodeRemoteLoginSettings() { } @@ -1332,6 +1408,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public BatchNodeState(string value) { throw null; } public static Azure.Compute.Batch.BatchNodeState Creating { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Deallocated { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Deallocating { get { throw null; } } public static Azure.Compute.Batch.BatchNodeState Idle { get { throw null; } } public static Azure.Compute.Batch.BatchNodeState LeavingPool { get { throw null; } } public static Azure.Compute.Batch.BatchNodeState Offline { get { throw null; } } @@ -1701,9 +1779,20 @@ public partial class BatchPoolUpdateContent : System.ClientModel.Primitives.IJso { public BatchPoolUpdateContent() { } public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + public bool? EnableInterNodeCommunication { get { throw null; } set { } } public System.Collections.Generic.IList Metadata { get { throw null; } } + public System.Collections.Generic.IList MountConfiguration { get { throw null; } } + public Azure.Compute.Batch.NetworkConfiguration NetworkConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ResourceTags { get { throw null; } } public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } set { } } public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskSchedulingPolicy TaskSchedulingPolicy { get { throw null; } set { } } + public int? TaskSlotsPerNode { get { throw null; } set { } } + public Azure.Compute.Batch.UpgradePolicy UpgradePolicy { get { throw null; } set { } } + public System.Collections.Generic.IList UserAccounts { get { throw null; } } + public Azure.Compute.Batch.VirtualMachineConfiguration VirtualMachineConfiguration { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Compute.Batch.BatchPoolUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1962,6 +2051,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class BatchTaskContainerSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BatchTaskContainerSettings(string imageName) { } + public System.Collections.Generic.IList ContainerHostBatchBindMounts { get { throw null; } } public string ContainerRunOptions { get { throw null; } set { } } public string ImageName { get { throw null; } set { } } public Azure.Compute.Batch.ContainerRegistryReference Registry { get { throw null; } set { } } @@ -2252,7 +2342,7 @@ public static partial class ComputeBatchModelFactory public static Azure.Compute.Batch.BatchJobStatistics BatchJobStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, long numSucceededTasks = (long)0, long numFailedTasks = (long)0, long numTaskRetries = (long)0, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } public static Azure.Compute.Batch.BatchNode BatchNode(string id = null, string url = null, Azure.Compute.Batch.BatchNodeState? state = default(Azure.Compute.Batch.BatchNodeState?), Azure.Compute.Batch.SchedulingState? schedulingState = default(Azure.Compute.Batch.SchedulingState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastBootTime = default(System.DateTimeOffset?), System.DateTimeOffset? allocationTime = default(System.DateTimeOffset?), string ipAddress = null, string affinityId = null, string vmSize = null, int? totalTasksRun = default(int?), int? runningTasksCount = default(int?), int? runningTaskSlotsCount = default(int?), int? totalTasksSucceeded = default(int?), System.Collections.Generic.IEnumerable recentTasks = null, Azure.Compute.Batch.BatchStartTask startTask = null, Azure.Compute.Batch.BatchStartTaskInfo startTaskInfo = null, System.Collections.Generic.IEnumerable errors = null, bool? isDedicated = default(bool?), Azure.Compute.Batch.BatchNodeEndpointConfiguration endpointConfiguration = null, Azure.Compute.Batch.BatchNodeAgentInfo nodeAgentInfo = null, Azure.Compute.Batch.VirtualMachineInfo virtualMachineInfo = null) { throw null; } public static Azure.Compute.Batch.BatchNodeAgentInfo BatchNodeAgentInfo(string version = null, System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset)) { throw null; } - public static Azure.Compute.Batch.BatchNodeCounts BatchNodeCounts(int creating = 0, int idle = 0, int offline = 0, int preempted = 0, int rebooting = 0, int reimaging = 0, int running = 0, int starting = 0, int startTaskFailed = 0, int leavingPool = 0, int unknown = 0, int unusable = 0, int waitingForStartTask = 0, int total = 0, int upgradingOs = 0) { throw null; } + public static Azure.Compute.Batch.BatchNodeCounts BatchNodeCounts(int creating = 0, int idle = 0, int offline = 0, int preempted = 0, int rebooting = 0, int reimaging = 0, int running = 0, int starting = 0, int startTaskFailed = 0, int leavingPool = 0, int unknown = 0, int unusable = 0, int waitingForStartTask = 0, int deallocated = 0, int deallocating = 0, int total = 0, int upgradingOs = 0) { throw null; } public static Azure.Compute.Batch.BatchNodeEndpointConfiguration BatchNodeEndpointConfiguration(System.Collections.Generic.IEnumerable inboundEndpoints = null) { throw null; } public static Azure.Compute.Batch.BatchNodeError BatchNodeError(string code = null, string message = null, System.Collections.Generic.IEnumerable errorDetails = null) { throw null; } public static Azure.Compute.Batch.BatchNodeFile BatchNodeFile(string name = null, string url = null, bool? isDirectory = default(bool?), Azure.Compute.Batch.FileProperties properties = null) { throw null; } @@ -2283,8 +2373,8 @@ public static partial class ComputeBatchModelFactory public static Azure.Compute.Batch.BatchTaskInfo BatchTaskInfo(string taskUrl = null, string jobId = null, string taskId = null, int? subtaskId = default(int?), Azure.Compute.Batch.BatchTaskState taskState = default(Azure.Compute.Batch.BatchTaskState), Azure.Compute.Batch.BatchTaskExecutionInfo executionInfo = null) { throw null; } public static Azure.Compute.Batch.BatchTaskSlotCounts BatchTaskSlotCounts(int active = 0, int running = 0, int completed = 0, int succeeded = 0, int failed = 0) { throw null; } public static Azure.Compute.Batch.BatchTaskStatistics BatchTaskStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } - public static Azure.Compute.Batch.FileProperties FileProperties(System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), System.DateTimeOffset lastModified = default(System.DateTimeOffset), long contentLength = (long)0, string contentType = null, string fileMode = null) { throw null; } - public static Azure.Compute.Batch.ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null) { throw null; } + public static Azure.Compute.Batch.FileProperties FileProperties(System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), System.DateTimeOffset lastModified = default(System.DateTimeOffset), string contentLength = null, string contentType = null, string fileMode = null) { throw null; } + public static Azure.Compute.Batch.ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null, string sharedGalleryImageId = null, string communityGalleryImageId = null) { throw null; } public static Azure.Compute.Batch.InboundEndpoint InboundEndpoint(string name = null, Azure.Compute.Batch.InboundEndpointProtocol protocol = default(Azure.Compute.Batch.InboundEndpointProtocol), string publicIpAddress = null, string publicFQDN = null, int frontendPort = 0, int backendPort = 0) { throw null; } public static Azure.Compute.Batch.InstanceViewStatus InstanceViewStatus(string code = null, string displayStatus = null, Azure.Compute.Batch.StatusLevelTypes? level = default(Azure.Compute.Batch.StatusLevelTypes?), string message = null, System.DateTimeOffset? time = default(System.DateTimeOffset?)) { throw null; } public static Azure.Compute.Batch.NameValuePair NameValuePair(string name = null, string value = null) { throw null; } @@ -2309,6 +2399,40 @@ 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 ContainerHostBatchBindMountEntry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerHostBatchBindMountEntry() { } + public bool? IsReadOnly { get { throw null; } set { } } + public Azure.Compute.Batch.ContainerHostDataPath? Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ContainerHostBatchBindMountEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ContainerHostBatchBindMountEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ContainerHostDataPath : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerHostDataPath(string value) { throw null; } + public static Azure.Compute.Batch.ContainerHostDataPath Applications { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath JobPrep { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath Shared { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath Startup { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath Task { get { throw null; } } + public static Azure.Compute.Batch.ContainerHostDataPath VfsMounts { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ContainerHostDataPath 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.Compute.Batch.ContainerHostDataPath left, Azure.Compute.Batch.ContainerHostDataPath right) { throw null; } + public static implicit operator Azure.Compute.Batch.ContainerHostDataPath (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ContainerHostDataPath left, Azure.Compute.Batch.ContainerHostDataPath right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerRegistryReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryReference() { } @@ -2588,7 +2712,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class FileProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FileProperties() { } - public long ContentLength { get { throw null; } } + public string ContentLength { get { throw null; } } public string ContentType { get { throw null; } } public System.DateTimeOffset? CreationTime { get { throw null; } } public string FileMode { get { throw null; } } @@ -2615,9 +2739,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ImageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ImageReference() { } + public string CommunityGalleryImageId { get { throw null; } set { } } public string ExactVersion { get { throw null; } } public string Offer { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + public string SharedGalleryImageId { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } public string VirtualMachineImageId { get { throw null; } set { } } @@ -2763,8 +2889,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ManagedDisk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ManagedDisk(Azure.Compute.Batch.StorageAccountType storageAccountType) { } - public Azure.Compute.Batch.StorageAccountType StorageAccountType { get { throw null; } set { } } + public ManagedDisk() { } + public Azure.Compute.Batch.VMDiskSecurityProfile SecurityProfile { get { throw null; } set { } } + public Azure.Compute.Batch.StorageAccountType? StorageAccountType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Compute.Batch.ManagedDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3109,6 +3236,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.Compute.Batch.SchedulingState left, Azure.Compute.Batch.SchedulingState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecurityEncryptionTypes : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecurityEncryptionTypes(string value) { throw null; } + public static Azure.Compute.Batch.SecurityEncryptionTypes NonPersistedTPM { get { throw null; } } + public static Azure.Compute.Batch.SecurityEncryptionTypes VMGuestStateOnly { get { throw null; } } + public bool Equals(Azure.Compute.Batch.SecurityEncryptionTypes 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.Compute.Batch.SecurityEncryptionTypes left, Azure.Compute.Batch.SecurityEncryptionTypes right) { throw null; } + public static implicit operator Azure.Compute.Batch.SecurityEncryptionTypes (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.SecurityEncryptionTypes left, Azure.Compute.Batch.SecurityEncryptionTypes right) { throw null; } + public override string ToString() { throw null; } + } public partial class SecurityProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecurityProfile(bool encryptionAtHost, Azure.Compute.Batch.SecurityTypes securityType, Azure.Compute.Batch.UefiSettings uefiSettings) { } @@ -3128,6 +3273,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public SecurityTypes(string value) { throw null; } + public static Azure.Compute.Batch.SecurityTypes ConfidentialVM { get { throw null; } } public static Azure.Compute.Batch.SecurityTypes TrustedLaunch { get { throw null; } } public bool Equals(Azure.Compute.Batch.SecurityTypes other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3332,6 +3478,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 VMDiskSecurityProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMDiskSecurityProfile() { } + public Azure.Compute.Batch.SecurityEncryptionTypes? SecurityEncryptionType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VMDiskSecurityProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VMDiskSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VMExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VMExtension(string name, string publisher, string type) { } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs index a55f474ba013..c3b9be08a2f0 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs @@ -52,7 +52,7 @@ public AutomaticOsUpgradePolicy() /// Initializes a new instance of . /// Whether OS image rollback feature should be disabled. - /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. /// Defer OS upgrades on the TVMs if they are running tasks. /// Keeps track of any properties unknown to the library. @@ -67,7 +67,7 @@ internal AutomaticOsUpgradePolicy(bool? disableAutomaticRollback, bool? enableAu /// Whether OS image rollback feature should be disabled. public bool? DisableAutomaticRollback { get; set; } - /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. public bool? EnableAutomaticOsUpgrade { get; set; } /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. public bool? UseRollingUpgradePolicy { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs index 47672eb0c12f..7e5fe5063d76 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs @@ -1656,14 +1656,15 @@ public virtual Response RemoveNodes(string poolId, RequestContent content, int? /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will delete the Job even if the corresponding nodes have not fully processed the deletion. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual async Task DeleteJobAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual async Task DeleteJobAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); @@ -1671,7 +1672,7 @@ public virtual async Task DeleteJobAsync(string jobId, int? timeOutInS scope.Start(); try { - using HttpMessage message = CreateDeleteJobRequest(jobId, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateDeleteJobRequest(jobId, timeOutInSeconds, ocpdate, force, requestConditions, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1699,14 +1700,15 @@ public virtual async Task DeleteJobAsync(string jobId, int? timeOutInS /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will delete the Job even if the corresponding nodes have not fully processed the deletion. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual Response DeleteJob(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual Response DeleteJob(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); @@ -1714,7 +1716,7 @@ public virtual Response DeleteJob(string jobId, int? timeOutInSeconds = null, Da scope.Start(); try { - using HttpMessage message = CreateDeleteJobRequest(jobId, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateDeleteJobRequest(jobId, timeOutInSeconds, ocpdate, force, requestConditions, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -2379,6 +2381,7 @@ public virtual Response EnableJob(string jobId, int? timeOutInSeconds = null, Da /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will terminate the Job even if the corresponding nodes have not fully processed the termination. The default value is false. /// The content to send as the request conditions of the request. /// The cancellation token to use. /// is null. @@ -2391,14 +2394,14 @@ public virtual Response EnableJob(string jobId, int? timeOutInSeconds = null, Da /// state, they will remain in the active state. Once a Job is terminated, new /// Tasks cannot be added and any remaining active Tasks will not be scheduled. /// - /// - public virtual async Task TerminateJobAsync(string jobId, BatchJobTerminateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + /// + public virtual async Task TerminateJobAsync(string jobId, BatchJobTerminateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); using RequestContent content = parameters?.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await TerminateJobAsync(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + Response response = await TerminateJobAsync(jobId, content, timeOutInSeconds, ocpdate, force, requestConditions, context).ConfigureAwait(false); return response; } @@ -2411,6 +2414,7 @@ public virtual async Task TerminateJobAsync(string jobId, BatchJobTerm /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will terminate the Job even if the corresponding nodes have not fully processed the termination. The default value is false. /// The content to send as the request conditions of the request. /// The cancellation token to use. /// is null. @@ -2423,14 +2427,14 @@ public virtual async Task TerminateJobAsync(string jobId, BatchJobTerm /// state, they will remain in the active state. Once a Job is terminated, new /// Tasks cannot be added and any remaining active Tasks will not be scheduled. /// - /// - public virtual Response TerminateJob(string jobId, BatchJobTerminateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + /// + public virtual Response TerminateJob(string jobId, BatchJobTerminateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); using RequestContent content = parameters?.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = TerminateJob(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + Response response = TerminateJob(jobId, content, timeOutInSeconds, ocpdate, force, requestConditions, context); return response; } @@ -2444,7 +2448,7 @@ public virtual Response TerminateJob(string jobId, BatchJobTerminateContent para /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2457,14 +2461,15 @@ public virtual Response TerminateJob(string jobId, BatchJobTerminateContent para /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will terminate the Job even if the corresponding nodes have not fully processed the termination. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual async Task TerminateJobAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual async Task TerminateJobAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); @@ -2472,7 +2477,7 @@ public virtual async Task TerminateJobAsync(string jobId, RequestConte scope.Start(); try { - using HttpMessage message = CreateTerminateJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateTerminateJobRequest(jobId, content, timeOutInSeconds, ocpdate, force, requestConditions, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -2492,7 +2497,7 @@ public virtual async Task TerminateJobAsync(string jobId, RequestConte /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2505,14 +2510,15 @@ public virtual async Task TerminateJobAsync(string jobId, RequestConte /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will terminate the Job even if the corresponding nodes have not fully processed the termination. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual Response TerminateJob(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual Response TerminateJob(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); @@ -2520,7 +2526,7 @@ public virtual Response TerminateJob(string jobId, RequestContent content, int? scope.Start(); try { - using HttpMessage message = CreateTerminateJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateTerminateJobRequest(jobId, content, timeOutInSeconds, ocpdate, force, requestConditions, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -2848,14 +2854,15 @@ public virtual Response GetJobTaskCounts(string jobId, int? timeOutInSeconds, Da /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will delete the JobSchedule even if the corresponding nodes have not fully processed the deletion. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual async Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual async Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); @@ -2863,7 +2870,7 @@ public virtual async Task DeleteJobScheduleAsync(string jobScheduleId, scope.Start(); try { - using HttpMessage message = CreateDeleteJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateDeleteJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, force, requestConditions, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -2891,14 +2898,15 @@ public virtual async Task DeleteJobScheduleAsync(string jobScheduleId, /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will delete the JobSchedule even if the corresponding nodes have not fully processed the deletion. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); @@ -2906,7 +2914,7 @@ public virtual Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSe scope.Start(); try { - using HttpMessage message = CreateDeleteJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateDeleteJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, force, requestConditions, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -3502,14 +3510,15 @@ public virtual Response EnableJobSchedule(string jobScheduleId, int? timeOutInSe /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will terminate the JobSchedule even if the corresponding nodes have not fully processed the termination. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual async Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual async Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); @@ -3517,7 +3526,7 @@ public virtual async Task TerminateJobScheduleAsync(string jobSchedule scope.Start(); try { - using HttpMessage message = CreateTerminateJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateTerminateJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, force, requestConditions, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -3545,14 +3554,15 @@ public virtual async Task TerminateJobScheduleAsync(string jobSchedule /// current system clock time; set it explicitly if you are calling the REST API /// directly. /// + /// If true, the server will terminate the JobSchedule even if the corresponding nodes have not fully processed the termination. The default value is false. /// The content to send as the request conditions of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// 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. - /// - public virtual Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + /// + public virtual Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? force = null, RequestConditions requestConditions = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); @@ -3560,7 +3570,7 @@ public virtual Response TerminateJobSchedule(string jobScheduleId, int? timeOutI scope.Start(); try { - using HttpMessage message = CreateTerminateJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + using HttpMessage message = CreateTerminateJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, force, requestConditions, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -5746,6 +5756,402 @@ public virtual Response RebootNode(string poolId, string nodeId, RequestContent } } + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Starts the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// 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. + /// + public virtual async Task StartNodeAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.StartNode"); + scope.Start(); + try + { + using HttpMessage message = CreateStartNodeRequest(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Starts the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// 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. + /// + public virtual Response StartNode(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.StartNode"); + scope.Start(); + try + { + using HttpMessage message = CreateStartNodeRequest(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Reinstalls the operating system on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The options to use for reimaging the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// You can reinstall the operating system on a Compute Node only if it is in an + /// idle or running state. This API can be invoked only on Pools created with the + /// cloud service configuration property. + /// + /// + public virtual async Task ReimageNodeAsync(string poolId, string nodeId, BatchNodeReimageContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReimageNodeAsync(poolId, nodeId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Reinstalls the operating system on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The options to use for reimaging the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// You can reinstall the operating system on a Compute Node only if it is in an + /// idle or running state. This API can be invoked only on Pools created with the + /// cloud service configuration property. + /// + /// + public virtual Response ReimageNode(string poolId, string nodeId, BatchNodeReimageContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ReimageNode(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Reinstalls the operating system on the specified Compute Node. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// 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. + /// + public virtual async Task ReimageNodeAsync(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReimageNode"); + scope.Start(); + try + { + using HttpMessage message = CreateReimageNodeRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Reinstalls the operating system on the specified Compute Node. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// 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. + /// + public virtual Response ReimageNode(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReimageNode"); + scope.Start(); + try + { + using HttpMessage message = CreateReimageNodeRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deallocates the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The options to use for deallocating the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// You can deallocate a Compute Node only if it is in an idle or running state. + /// + public virtual async Task DeallocateNodeAsync(string poolId, string nodeId, BatchNodeDeallocateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await DeallocateNodeAsync(poolId, nodeId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Deallocates the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The options to use for deallocating the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// You can deallocate a Compute Node only if it is in an idle or running state. + /// + public virtual Response DeallocateNode(string poolId, string nodeId, BatchNodeDeallocateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = DeallocateNode(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Deallocates the specified Compute Node. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// 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. + /// + public virtual async Task DeallocateNodeAsync(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeallocateNode"); + scope.Start(); + try + { + using HttpMessage message = CreateDeallocateNodeRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Deallocates the specified Compute Node. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// 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. + /// + public virtual Response DeallocateNode(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeallocateNode"); + scope.Start(); + try + { + using HttpMessage message = CreateDeallocateNodeRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// Disables Task scheduling on the specified Compute Node. /// The ID of the Pool that contains the Compute Node. /// The ID of the Compute Node on which you want to disable Task scheduling. @@ -6003,9 +6409,8 @@ public virtual Response EnableNodeScheduling(string poolId, string nodeId, int? /// or is null. /// or is an empty string, and was expected to be non-empty. /// - /// Before you can remotely login to a Compute Node using the remote login - /// settings, you must create a user Account on the Compute Node. This API can be - /// invoked only on Pools created with the virtual machine configuration property. + /// Before you can remotely login to a Compute Node using the remote login settings, + /// you must create a user Account on the Compute Node. /// /// public virtual async Task> GetNodeRemoteLoginSettingsAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) @@ -6031,9 +6436,8 @@ public virtual async Task> GetNodeRemoteL /// or is null. /// or is an empty string, and was expected to be non-empty. /// - /// Before you can remotely login to a Compute Node using the remote login - /// settings, you must create a user Account on the Compute Node. This API can be - /// invoked only on Pools created with the virtual machine configuration property. + /// Before you can remotely login to a Compute Node using the remote login settings, + /// you must create a user Account on the Compute Node. /// /// public virtual Response GetNodeRemoteLoginSettings(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) @@ -7036,7 +7440,7 @@ public virtual Pageable GetApplications(int? timeOutInSeconds, DateT /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. /// /// The cancellation token to use. /// @@ -7082,7 +7486,7 @@ public virtual AsyncPageable GetPoolUsageMetricsAsync(int /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. /// /// The cancellation token to use. /// @@ -7140,7 +7544,7 @@ public virtual Pageable GetPoolUsageMetrics(int? timeOutI /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. /// /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. @@ -7191,7 +7595,7 @@ public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutIn /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. /// /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. @@ -7204,7 +7608,7 @@ public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds, D return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); } - /// Lists all of the Pools in the specified Account. + /// Lists all of the Pools which be mounted. /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". /// /// The time the request was issued. Client libraries typically set this to the @@ -7217,7 +7621,7 @@ public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds, D /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. /// /// An OData $select clause. /// An OData $expand clause. @@ -7231,7 +7635,7 @@ public virtual AsyncPageable GetPoolsAsync(int? timeOutInSeconds = nu return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchPool.DeserializeBatchPool(e), ClientDiagnostics, _pipeline, "BatchClient.GetPools", "value", "odata.nextLink", context); } - /// Lists all of the Pools in the specified Account. + /// Lists all of the Pools which be mounted. /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". /// /// The time the request was issued. Client libraries typically set this to the @@ -7244,7 +7648,7 @@ public virtual AsyncPageable GetPoolsAsync(int? timeOutInSeconds = nu /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. /// /// An OData $select clause. /// An OData $expand clause. @@ -7259,7 +7663,7 @@ public virtual Pageable GetPools(int? timeOutInSeconds = null, DateTi } /// - /// [Protocol Method] Lists all of the Pools in the specified Account. + /// [Protocol Method] Lists all of the Pools which be mounted. /// /// /// @@ -7285,7 +7689,7 @@ public virtual Pageable GetPools(int? timeOutInSeconds = null, DateTi /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. /// /// An OData $select clause. /// An OData $expand clause. @@ -7301,7 +7705,7 @@ public virtual AsyncPageable GetPoolsAsync(int? timeOutInSeconds, Da } /// - /// [Protocol Method] Lists all of the Pools in the specified Account. + /// [Protocol Method] Lists all of the Pools which be mounted. /// /// /// @@ -7327,7 +7731,7 @@ public virtual AsyncPageable GetPoolsAsync(int? timeOutInSeconds, Da /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. /// /// An OData $select clause. /// An OData $expand clause. @@ -7355,7 +7759,7 @@ public virtual Pageable GetPools(int? timeOutInSeconds, DateTimeOffs /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The cancellation token to use. /// @@ -7380,7 +7784,7 @@ public virtual AsyncPageable GetSupportedImagesAsync(int? t /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The cancellation token to use. /// @@ -7419,7 +7823,7 @@ public virtual Pageable GetSupportedImages(int? timeOutInSe /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. @@ -7459,7 +7863,7 @@ public virtual AsyncPageable GetSupportedImagesAsync(int? timeOutInS /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. @@ -7489,7 +7893,7 @@ public virtual Pageable GetSupportedImages(int? timeOutInSeconds, Da /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The cancellation token to use. /// @@ -7518,7 +7922,7 @@ public virtual AsyncPageable GetPoolNodeCountsAsync(int? ti /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The cancellation token to use. /// @@ -7559,7 +7963,7 @@ public virtual Pageable GetPoolNodeCounts(int? timeOutInSec /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. @@ -7601,7 +8005,7 @@ public virtual AsyncPageable GetPoolNodeCountsAsync(int? timeOutInSe /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. /// /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. @@ -7627,7 +8031,7 @@ public virtual Pageable GetPoolNodeCounts(int? timeOutInSeconds, Dat /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. /// /// An OData $select clause. /// An OData $expand clause. @@ -7654,7 +8058,7 @@ public virtual AsyncPageable GetJobsAsync(int? timeOutInSeconds = null /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. /// /// An OData $select clause. /// An OData $expand clause. @@ -7695,7 +8099,7 @@ public virtual Pageable GetJobs(int? timeOutInSeconds = null, DateTime /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. /// /// An OData $select clause. /// An OData $expand clause. @@ -7737,7 +8141,7 @@ public virtual AsyncPageable GetJobsAsync(int? timeOutInSeconds, Dat /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. /// /// An OData $select clause. /// An OData $expand clause. @@ -7766,7 +8170,7 @@ public virtual Pageable GetJobs(int? timeOutInSeconds, DateTimeOffse /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. /// /// An OData $select clause. /// An OData $expand clause. @@ -7798,7 +8202,7 @@ public virtual AsyncPageable GetJobsFromSchedulesAsync(string jobSched /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. /// /// An OData $select clause. /// An OData $expand clause. @@ -7844,7 +8248,7 @@ public virtual Pageable GetJobsFromSchedules(string jobScheduleId, int /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. /// /// An OData $select clause. /// An OData $expand clause. @@ -7891,7 +8295,7 @@ public virtual AsyncPageable GetJobsFromSchedulesAsync(string jobSch /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. /// /// An OData $select clause. /// An OData $expand clause. @@ -7927,7 +8331,7 @@ public virtual Pageable GetJobsFromSchedules(string jobScheduleId, i /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. /// /// An OData $select clause. /// The cancellation token to use. @@ -7969,7 +8373,7 @@ public virtual AsyncPageable GetJobPrep /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. /// /// An OData $select clause. /// The cancellation token to use. @@ -8023,7 +8427,7 @@ public virtual Pageable GetJobPreparati /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. /// /// An OData $select clause. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. @@ -8070,7 +8474,7 @@ public virtual AsyncPageable GetJobPreparationAndReleaseTaskStatuses /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. /// /// An OData $select clause. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. @@ -8101,7 +8505,7 @@ public virtual Pageable GetJobPreparationAndReleaseTaskStatuses(stri /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. /// /// An OData $select clause. /// An OData $expand clause. @@ -8128,7 +8532,7 @@ public virtual AsyncPageable GetJobSchedulesAsync(int? timeOut /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. /// /// An OData $select clause. /// An OData $expand clause. @@ -8169,7 +8573,7 @@ public virtual Pageable GetJobSchedules(int? timeOutInSeconds /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. /// /// An OData $select clause. /// An OData $expand clause. @@ -8211,7 +8615,7 @@ public virtual AsyncPageable GetJobSchedulesAsync(int? timeOutInSeco /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. /// /// An OData $select clause. /// An OData $expand clause. @@ -8240,7 +8644,7 @@ public virtual Pageable GetJobSchedules(int? timeOutInSeconds, DateT /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. /// /// An OData $select clause. /// An OData $expand clause. @@ -8277,7 +8681,7 @@ public virtual AsyncPageable GetTasksAsync(string jobId, int? timeOut /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. /// /// An OData $select clause. /// An OData $expand clause. @@ -8328,7 +8732,7 @@ public virtual Pageable GetTasks(string jobId, int? timeOutInSeconds /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. /// /// An OData $select clause. /// An OData $expand clause. @@ -8375,7 +8779,7 @@ public virtual AsyncPageable GetTasksAsync(string jobId, int? timeOu /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. /// /// An OData $select clause. /// An OData $expand clause. @@ -8549,7 +8953,7 @@ public virtual Pageable GetSubTasks(string jobId, string taskId, int /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. /// /// /// Whether to list children of the Task directory. This parameter can be used in @@ -8585,7 +8989,7 @@ public virtual AsyncPageable GetTaskFilesAsync(string jobId, stri /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. /// /// /// Whether to list children of the Task directory. This parameter can be used in @@ -8635,7 +9039,7 @@ public virtual Pageable GetTaskFiles(string jobId, string taskId, /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. /// /// /// Whether to list children of the Task directory. This parameter can be used in @@ -8686,7 +9090,7 @@ public virtual AsyncPageable GetTaskFilesAsync(string jobId, string /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. /// /// /// Whether to list children of the Task directory. This parameter can be used in @@ -8722,7 +9126,7 @@ public virtual Pageable GetTaskFiles(string jobId, string taskId, in /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. /// /// An OData $select clause. /// The cancellation token to use. @@ -8753,7 +9157,7 @@ public virtual AsyncPageable GetNodesAsync(string poolId, int? timeOu /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. /// /// An OData $select clause. /// The cancellation token to use. @@ -8798,7 +9202,7 @@ public virtual Pageable GetNodes(string poolId, int? timeOutInSeconds /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. /// /// An OData $select clause. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. @@ -8844,7 +9248,7 @@ public virtual AsyncPageable GetNodesAsync(string poolId, int? timeO /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. /// /// An OData $select clause. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. @@ -9023,7 +9427,7 @@ public virtual Pageable GetNodeExtensions(string poolId, string node /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. /// /// Whether to list children of a directory. /// The cancellation token to use. @@ -9056,7 +9460,7 @@ public virtual AsyncPageable GetNodeFilesAsync(string poolId, str /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. /// /// Whether to list children of a directory. /// The cancellation token to use. @@ -9103,7 +9507,7 @@ public virtual Pageable GetNodeFiles(string poolId, string nodeId /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. /// /// Whether to list children of a directory. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. @@ -9151,7 +9555,7 @@ public virtual AsyncPageable GetNodeFilesAsync(string poolId, string /// /// /// An OData $filter clause. For more information on constructing this filter, see - /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. /// /// Whether to list children of a directory. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. @@ -9727,7 +10131,7 @@ internal HttpMessage CreateGetPoolNodeCountsRequest(int? timeOutInSeconds, DateT return message; } - internal HttpMessage CreateDeleteJobRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + internal HttpMessage CreateDeleteJobRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, bool? force, RequestConditions requestConditions, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier202); var request = message.Request; @@ -9741,6 +10145,10 @@ internal HttpMessage CreateDeleteJobRequest(string jobId, int? timeOutInSeconds, { uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); } + if (force != null) + { + uri.AppendQuery("force", force.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("client-request-id", message.Request.ClientRequestId); @@ -9917,7 +10325,7 @@ internal HttpMessage CreateEnableJobRequest(string jobId, int? timeOutInSeconds, return message; } - internal HttpMessage CreateTerminateJobRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + internal HttpMessage CreateTerminateJobRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, bool? force, RequestConditions requestConditions, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier202); var request = message.Request; @@ -9932,6 +10340,10 @@ internal HttpMessage CreateTerminateJobRequest(string jobId, RequestContent cont { uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); } + if (force != null) + { + uri.AppendQuery("force", force.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("client-request-id", message.Request.ClientRequestId); @@ -10150,7 +10562,7 @@ internal HttpMessage CreateJobScheduleExistsRequest(string jobScheduleId, int? t return message; } - internal HttpMessage CreateDeleteJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + internal HttpMessage CreateDeleteJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, bool? force, RequestConditions requestConditions, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier202); var request = message.Request; @@ -10164,6 +10576,10 @@ internal HttpMessage CreateDeleteJobScheduleRequest(string jobScheduleId, int? t { uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); } + if (force != null) + { + uri.AppendQuery("force", force.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("client-request-id", message.Request.ClientRequestId); @@ -10338,7 +10754,7 @@ internal HttpMessage CreateEnableJobScheduleRequest(string jobScheduleId, int? t return message; } - internal HttpMessage CreateTerminateJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + internal HttpMessage CreateTerminateJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, bool? force, RequestConditions requestConditions, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier202); var request = message.Request; @@ -10353,6 +10769,10 @@ internal HttpMessage CreateTerminateJobScheduleRequest(string jobScheduleId, int { uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); } + if (force != null) + { + uri.AppendQuery("force", force.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("client-request-id", message.Request.ClientRequestId); @@ -11025,6 +11445,94 @@ internal HttpMessage CreateRebootNodeRequest(string poolId, string nodeId, Reque return message; } + internal HttpMessage CreateStartNodeRequest(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateReimageNodeRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/reimage", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeallocateNodeRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/deallocate", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + internal HttpMessage CreateDisableNodeSchedulingRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs index eab2e5942414..c4f6c163cc57 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs @@ -13,13 +13,13 @@ namespace Azure.Compute.Batch /// Client options for BatchClient. public partial class BatchClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_02_01_19_0; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_07_01_20_0; /// The version of the service to use. public enum ServiceVersion { - /// Service version "2024-02-01.19.0". - V2024_02_01_19_0 = 1, + /// Service version "2024-07-01.20.0". + V2024_07_01_20_0 = 1, } internal string Version { get; } @@ -29,7 +29,7 @@ public BatchClientOptions(ServiceVersion version = LatestVersion) { Version = version switch { - ServiceVersion.V2024_02_01_19_0 => "2024-02-01.19.0", + ServiceVersion.V2024_07_01_20_0 => "2024-07-01.20.0", _ => throw new NotSupportedException() }; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs index b516fefc1292..3084acc36928 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs @@ -83,7 +83,7 @@ public BatchJob(BatchPoolInfo poolInfo) /// The network configuration for the Job. /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. /// The execution information for the Job. - /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. /// Keeps track of any properties unknown to the library. internal BatchJob(string id, string displayName, bool? usesTaskDependencies, string url, string eTag, DateTimeOffset? lastModified, DateTimeOffset? creationTime, BatchJobState? state, DateTimeOffset? stateTransitionTime, BatchJobState? previousState, DateTimeOffset? previousStateTransitionTime, int? priority, bool? allowTaskPreemption, int? maxParallelTasks, BatchJobConstraints constraints, BatchJobManagerTask jobManagerTask, BatchJobPreparationTask jobPreparationTask, BatchJobReleaseTask jobReleaseTask, IReadOnlyList commonEnvironmentSettings, BatchPoolInfo poolInfo, OnAllBatchTasksComplete? onAllTasksComplete, OnBatchTaskFailure? onTaskFailure, BatchJobNetworkConfiguration networkConfiguration, IList metadata, BatchJobExecutionInfo executionInfo, BatchJobStatistics stats, IDictionary serializedAdditionalRawData) { @@ -171,7 +171,7 @@ internal BatchJob() public IList Metadata { get; } /// The execution information for the Job. public BatchJobExecutionInfo ExecutionInfo { get; } - /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. public BatchJobStatistics Stats { get; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs index 7f679bb2fb59..9ebea8b406d9 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs @@ -71,7 +71,7 @@ public partial class BatchJobManagerTask /// Initializes a new instance of . /// A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. - /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// or is null. public BatchJobManagerTask(string id, string commandLine) { @@ -89,7 +89,7 @@ public BatchJobManagerTask(string id, string commandLine) /// Initializes a new instance of . /// A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. /// The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. - /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. @@ -141,7 +141,7 @@ internal BatchJobManagerTask() public string Id { get; set; } /// The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. public string DisplayName { get; set; } - /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). public string CommandLine { get; set; } /// The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. public BatchTaskContainerSettings ContainerSettings { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs index b77d46998063..793ede70b803 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs @@ -36,6 +36,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(SubnetId); + writer.WritePropertyName("skipWithdrawFromVNet"u8); + writer.WriteBooleanValue(SkipWithdrawFromVNet); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,6 +76,7 @@ internal static BatchJobNetworkConfiguration DeserializeBatchJobNetworkConfigura return null; } string subnetId = default; + bool skipWithdrawFromVNet = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -83,13 +86,18 @@ internal static BatchJobNetworkConfiguration DeserializeBatchJobNetworkConfigura subnetId = property.Value.GetString(); continue; } + if (property.NameEquals("skipWithdrawFromVNet"u8)) + { + skipWithdrawFromVNet = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new BatchJobNetworkConfiguration(subnetId, serializedAdditionalRawData); + return new BatchJobNetworkConfiguration(subnetId, skipWithdrawFromVNet, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs index d6697158bf5e..931e05614029 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs @@ -46,21 +46,25 @@ public partial class BatchJobNetworkConfiguration private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. /// is null. - public BatchJobNetworkConfiguration(string subnetId) + public BatchJobNetworkConfiguration(string subnetId, bool skipWithdrawFromVNet) { Argument.AssertNotNull(subnetId, nameof(subnetId)); SubnetId = subnetId; + SkipWithdrawFromVNet = skipWithdrawFromVNet; } /// Initializes a new instance of . - /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. /// Keeps track of any properties unknown to the library. - internal BatchJobNetworkConfiguration(string subnetId, IDictionary serializedAdditionalRawData) + internal BatchJobNetworkConfiguration(string subnetId, bool skipWithdrawFromVNet, IDictionary serializedAdditionalRawData) { SubnetId = subnetId; + SkipWithdrawFromVNet = skipWithdrawFromVNet; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -69,7 +73,9 @@ internal BatchJobNetworkConfiguration() { } - /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. public string SubnetId { get; set; } + /// Whether to withdraw Compute Nodes from the virtual network to DNC when the job is terminated or deleted. If true, nodes will remain joined to the virtual network to DNC. If false, nodes will automatically withdraw when the job ends. Defaults to false. + public bool SkipWithdrawFromVNet { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs index ce02002b17a0..cef539ebd5a2 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs @@ -73,7 +73,7 @@ public partial class BatchJobPreparationTask private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// is null. public BatchJobPreparationTask(string commandLine) { @@ -86,7 +86,7 @@ public BatchJobPreparationTask(string commandLine) /// Initializes a new instance of . /// A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). - /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. /// A list of environment variable settings for the Job Preparation Task. @@ -116,7 +116,7 @@ internal BatchJobPreparationTask() /// A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). public string Id { get; set; } - /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). public string CommandLine { get; set; } /// The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. public BatchTaskContainerSettings ContainerSettings { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs index acbf28a11f7d..c9a63263aaf7 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs @@ -63,7 +63,7 @@ public partial class BatchJobReleaseTask private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// is null. public BatchJobReleaseTask(string commandLine) { @@ -76,7 +76,7 @@ public BatchJobReleaseTask(string commandLine) /// Initializes a new instance of . /// A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). - /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. /// A list of environment variable settings for the Job Release Task. @@ -104,7 +104,7 @@ internal BatchJobReleaseTask() /// A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). public string Id { get; set; } - /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). public string CommandLine { get; set; } /// The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. public BatchTaskContainerSettings ContainerSettings { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs index f5789261d03b..c865fc428c1a 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs @@ -74,6 +74,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -118,6 +123,7 @@ internal static BatchJobUpdateContent DeserializeBatchJobUpdateContent(JsonEleme BatchPoolInfo poolInfo = default; OnAllBatchTasksComplete? onAllTasksComplete = default; IList metadata = default; + BatchJobNetworkConfiguration networkConfiguration = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -190,6 +196,15 @@ internal static BatchJobUpdateContent DeserializeBatchJobUpdateContent(JsonEleme metadata = array; continue; } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = BatchJobNetworkConfiguration.DeserializeBatchJobNetworkConfiguration(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -204,6 +219,7 @@ internal static BatchJobUpdateContent DeserializeBatchJobUpdateContent(JsonEleme poolInfo, onAllTasksComplete, metadata ?? new ChangeTrackingList(), + networkConfiguration, serializedAdditionalRawData); } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs index 5776641d88ea..0cbcd028e9a1 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs @@ -59,8 +59,9 @@ public BatchJobUpdateContent() /// The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool. /// The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). /// A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged. + /// The network configuration for the Job. /// Keeps track of any properties unknown to the library. - internal BatchJobUpdateContent(int? priority, bool? allowTaskPreemption, int? maxParallelTasks, BatchJobConstraints constraints, BatchPoolInfo poolInfo, OnAllBatchTasksComplete? onAllTasksComplete, IList metadata, IDictionary serializedAdditionalRawData) + internal BatchJobUpdateContent(int? priority, bool? allowTaskPreemption, int? maxParallelTasks, BatchJobConstraints constraints, BatchPoolInfo poolInfo, OnAllBatchTasksComplete? onAllTasksComplete, IList metadata, BatchJobNetworkConfiguration networkConfiguration, IDictionary serializedAdditionalRawData) { Priority = priority; AllowTaskPreemption = allowTaskPreemption; @@ -69,6 +70,7 @@ internal BatchJobUpdateContent(int? priority, bool? allowTaskPreemption, int? ma PoolInfo = poolInfo; OnAllTasksComplete = onAllTasksComplete; Metadata = metadata; + NetworkConfiguration = networkConfiguration; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,5 +88,7 @@ internal BatchJobUpdateContent(int? priority, bool? allowTaskPreemption, int? ma public OnAllBatchTasksComplete? OnAllTasksComplete { get; set; } /// A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged. public IList Metadata { get; } + /// The network configuration for the Job. + public BatchJobNetworkConfiguration NetworkConfiguration { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs index a1e4ac04664e..eaf494b708ff 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs @@ -62,7 +62,7 @@ internal BatchNode() /// The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. /// The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. /// An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. - /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). /// The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. /// The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. /// The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. @@ -121,7 +121,7 @@ internal BatchNode(string id, string url, BatchNodeState? state, SchedulingState public string IpAddress { get; } /// An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. public string AffinityId { get; } - /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). public string VmSize { get; } /// The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. public int? TotalTasksRun { get; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs index 3be7e8a1103a..10b647dc8baf 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs @@ -60,6 +60,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Unusable); writer.WritePropertyName("waitingForStartTask"u8); writer.WriteNumberValue(WaitingForStartTask); + writer.WritePropertyName("deallocated"u8); + writer.WriteNumberValue(Deallocated); + writer.WritePropertyName("deallocating"u8); + writer.WriteNumberValue(Deallocating); writer.WritePropertyName("total"u8); writer.WriteNumberValue(Total); writer.WritePropertyName("upgradingOS"u8); @@ -114,6 +118,8 @@ internal static BatchNodeCounts DeserializeBatchNodeCounts(JsonElement element, int unknown = default; int unusable = default; int waitingForStartTask = default; + int deallocated = default; + int deallocating = default; int total = default; int upgradingOS = default; IDictionary serializedAdditionalRawData = default; @@ -185,6 +191,16 @@ internal static BatchNodeCounts DeserializeBatchNodeCounts(JsonElement element, waitingForStartTask = property.Value.GetInt32(); continue; } + if (property.NameEquals("deallocated"u8)) + { + deallocated = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("deallocating"u8)) + { + deallocating = property.Value.GetInt32(); + continue; + } if (property.NameEquals("total"u8)) { total = property.Value.GetInt32(); @@ -215,6 +231,8 @@ internal static BatchNodeCounts DeserializeBatchNodeCounts(JsonElement element, unknown, unusable, waitingForStartTask, + deallocated, + deallocating, total, upgradingOS, serializedAdditionalRawData); diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs index 56ccd9fa2373..04e5b38c071d 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs @@ -59,9 +59,11 @@ public partial class BatchNodeCounts /// The number of Compute Nodes in the unknown state. /// The number of Compute Nodes in the unusable state. /// The number of Compute Nodes in the waitingForStartTask state. + /// The number of Compute Nodes in the deallocated state. + /// The number of Compute Nodes in the deallocating state. /// The total number of Compute Nodes. /// The number of Compute Nodes in the upgradingOS state. - internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int rebooting, int reimaging, int running, int starting, int startTaskFailed, int leavingPool, int unknown, int unusable, int waitingForStartTask, int total, int upgradingOs) + internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int rebooting, int reimaging, int running, int starting, int startTaskFailed, int leavingPool, int unknown, int unusable, int waitingForStartTask, int deallocated, int deallocating, int total, int upgradingOs) { Creating = creating; Idle = idle; @@ -76,6 +78,8 @@ internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int Unknown = unknown; Unusable = unusable; WaitingForStartTask = waitingForStartTask; + Deallocated = deallocated; + Deallocating = deallocating; Total = total; UpgradingOs = upgradingOs; } @@ -94,10 +98,12 @@ internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int /// The number of Compute Nodes in the unknown state. /// The number of Compute Nodes in the unusable state. /// The number of Compute Nodes in the waitingForStartTask state. + /// The number of Compute Nodes in the deallocated state. + /// The number of Compute Nodes in the deallocating state. /// The total number of Compute Nodes. /// The number of Compute Nodes in the upgradingOS state. /// Keeps track of any properties unknown to the library. - internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int rebooting, int reimaging, int running, int starting, int startTaskFailed, int leavingPool, int unknown, int unusable, int waitingForStartTask, int total, int upgradingOs, IDictionary serializedAdditionalRawData) + internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int rebooting, int reimaging, int running, int starting, int startTaskFailed, int leavingPool, int unknown, int unusable, int waitingForStartTask, int deallocated, int deallocating, int total, int upgradingOs, IDictionary serializedAdditionalRawData) { Creating = creating; Idle = idle; @@ -112,6 +118,8 @@ internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int Unknown = unknown; Unusable = unusable; WaitingForStartTask = waitingForStartTask; + Deallocated = deallocated; + Deallocating = deallocating; Total = total; UpgradingOs = upgradingOs; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -148,6 +156,10 @@ internal BatchNodeCounts() public int Unusable { get; } /// The number of Compute Nodes in the waitingForStartTask state. public int WaitingForStartTask { get; } + /// The number of Compute Nodes in the deallocated state. + public int Deallocated { get; } + /// The number of Compute Nodes in the deallocating state. + public int Deallocating { get; } /// The total number of Compute Nodes. public int Total { get; } /// The number of Compute Nodes in the upgradingOS state. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.Serialization.cs similarity index 54% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs rename to sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.Serialization.cs index 38665062d81a..aedc552556b7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.Serialization.cs @@ -7,17 +7,17 @@ using System; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.Compute.Batch { - [PersistableModelProxy(typeof(UnknownEntityComponentInformation))] - public partial class EntityComponentInformation : IUtf8JsonSerializable, IJsonModel + public partial class BatchNodeDeallocateContent : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,14 +28,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("entityComponentKind"u8); - writer.WriteStringValue(EntityComponentKind.ToString()); + if (Optional.IsDefined(NodeDeallocateOption)) + { + writer.WritePropertyName("nodeDeallocateOption"u8); + writer.WriteStringValue(NodeDeallocateOption.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -53,19 +56,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - EntityComponentInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + BatchNodeDeallocateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeBatchNodeDeallocateContent(document.RootElement, options); } - internal static EntityComponentInformation DeserializeEntityComponentInformation(JsonElement element, ModelReaderWriterOptions options = null) + internal static BatchNodeDeallocateContent DeserializeBatchNodeDeallocateContent(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,55 +76,66 @@ internal static EntityComponentInformation DeserializeEntityComponentInformation { return null; } - if (element.TryGetProperty("entityComponentKind", out JsonElement discriminator)) + BatchNodeDeallocateOption? nodeDeallocateOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) { - switch (discriminator.GetString()) + if (property.NameEquals("nodeDeallocateOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeDeallocateOption = new BatchNodeDeallocateOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") { - case "LearnedComponent": return LearnedComponent.DeserializeLearnedComponent(element, options); - case "ListComponent": return ListComponent.DeserializeListComponent(element, options); - case "PrebuiltComponent": return PrebuiltComponent.DeserializePrebuiltComponent(element, options); + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } - return UnknownEntityComponentInformation.DeserializeUnknownEntityComponentInformation(element, options); + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeDeallocateContent(nodeDeallocateOption, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support writing '{options.Format}' format."); } } - EntityComponentInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + BatchNodeDeallocateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeBatchNodeDeallocateContent(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(BatchNodeDeallocateContent)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static EntityComponentInformation FromResponse(Response response) + internal static BatchNodeDeallocateContent FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEntityComponentInformation(document.RootElement); + return DeserializeBatchNodeDeallocateContent(document.RootElement); } /// Convert into a . diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.cs new file mode 100644 index 000000000000..c14a7b03f81e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Options for deallocating a Compute Node. + public partial class BatchNodeDeallocateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 BatchNodeDeallocateContent() + { + } + + /// Initializes a new instance of . + /// When to deallocate the Compute Node and what to do with currently running Tasks. The default value is requeue. + /// Keeps track of any properties unknown to the library. + internal BatchNodeDeallocateContent(BatchNodeDeallocateOption? nodeDeallocateOption, IDictionary serializedAdditionalRawData) + { + NodeDeallocateOption = nodeDeallocateOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// When to deallocate the Compute Node and what to do with currently running Tasks. The default value is requeue. + public BatchNodeDeallocateOption? NodeDeallocateOption { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateOption.cs new file mode 100644 index 000000000000..b4c883a187e5 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocateOption.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.Compute.Batch +{ + /// BatchNodeDeallocateOption enums. + public readonly partial struct BatchNodeDeallocateOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeDeallocateOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequeueValue = "requeue"; + private const string TerminateValue = "terminate"; + private const string TaskCompletionValue = "taskcompletion"; + private const string RetainedDataValue = "retaineddata"; + + /// Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Deallocate the Compute Node as soon as Tasks have been terminated. + public static BatchNodeDeallocateOption Requeue { get; } = new BatchNodeDeallocateOption(RequeueValue); + /// Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Deallocate the Compute Node as soon as Tasks have been terminated. + public static BatchNodeDeallocateOption Terminate { get; } = new BatchNodeDeallocateOption(TerminateValue); + /// Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Deallocate the Compute Node when all Tasks have completed. + public static BatchNodeDeallocateOption TaskCompletion { get; } = new BatchNodeDeallocateOption(TaskCompletionValue); + /// Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Deallocate the Compute Node when all Task retention periods have expired. + public static BatchNodeDeallocateOption RetainedData { get; } = new BatchNodeDeallocateOption(RetainedDataValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeDeallocateOption left, BatchNodeDeallocateOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeDeallocateOption left, BatchNodeDeallocateOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BatchNodeDeallocateOption(string value) => new BatchNodeDeallocateOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeDeallocateOption other && Equals(other); + /// + public bool Equals(BatchNodeDeallocateOption 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/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageContent.Serialization.cs new file mode 100644 index 000000000000..66a50d339e1d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageContent.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeReimageContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeReimageContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeReimageOption)) + { + writer.WritePropertyName("nodeReimageOption"u8); + writer.WriteStringValue(NodeReimageOption.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BatchNodeReimageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeReimageContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeReimageContent(document.RootElement, options); + } + + internal static BatchNodeReimageContent DeserializeBatchNodeReimageContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchNodeReimageOption? nodeReimageOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeReimageOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeReimageOption = new BatchNodeReimageOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeReimageContent(nodeReimageOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeReimageContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeReimageContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeReimageContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeReimageContent)} 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 BatchNodeReimageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeReimageContent(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/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageContent.cs new file mode 100644 index 000000000000..8222990b7344 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for reimaging an Azure Batch Compute Node. + public partial class BatchNodeReimageContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 BatchNodeReimageContent() + { + } + + /// Initializes a new instance of . + /// When to reimage the Compute Node and what to do with currently running Tasks. The default value is requeue. + /// Keeps track of any properties unknown to the library. + internal BatchNodeReimageContent(BatchNodeReimageOption? nodeReimageOption, IDictionary serializedAdditionalRawData) + { + NodeReimageOption = nodeReimageOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// When to reimage the Compute Node and what to do with currently running Tasks. The default value is requeue. + public BatchNodeReimageOption? NodeReimageOption { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageOption.cs new file mode 100644 index 000000000000..1ceebbf46262 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeReimageOption.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.Compute.Batch +{ + /// BatchNodeReimageOption enums. + public readonly partial struct BatchNodeReimageOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeReimageOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequeueValue = "requeue"; + private const string TerminateValue = "terminate"; + private const string TaskCompletionValue = "taskcompletion"; + private const string RetainedDataValue = "retaineddata"; + + /// Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Reimage the Compute Node as soon as Tasks have been terminated. + public static BatchNodeReimageOption Requeue { get; } = new BatchNodeReimageOption(RequeueValue); + /// Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Reimage the Compute Node as soon as Tasks have been terminated. + public static BatchNodeReimageOption Terminate { get; } = new BatchNodeReimageOption(TerminateValue); + /// Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Reimage the Compute Node when all Tasks have completed. + public static BatchNodeReimageOption TaskCompletion { get; } = new BatchNodeReimageOption(TaskCompletionValue); + /// Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Reimage the Compute Node when all Task retention periods have expired. + public static BatchNodeReimageOption RetainedData { get; } = new BatchNodeReimageOption(RetainedDataValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeReimageOption left, BatchNodeReimageOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeReimageOption left, BatchNodeReimageOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BatchNodeReimageOption(string value) => new BatchNodeReimageOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeReimageOption other && Equals(other); + /// + public bool Equals(BatchNodeReimageOption 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/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs index b986f5ec1350..71bfaaba250f 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs @@ -36,6 +36,8 @@ public BatchNodeState(string value) private const string OfflineValue = "offline"; private const string PreemptedValue = "preempted"; private const string UpgradingOSValue = "upgradingos"; + private const string DeallocatedValue = "deallocated"; + private const string DeallocatingValue = "deallocating"; /// The Compute Node is not currently running a Task. public static BatchNodeState Idle { get; } = new BatchNodeState(IdleValue); @@ -65,6 +67,10 @@ public BatchNodeState(string value) public static BatchNodeState Preempted { get; } = new BatchNodeState(PreemptedValue); /// The Compute Node is undergoing an OS upgrade operation. public static BatchNodeState UpgradingOS { get; } = new BatchNodeState(UpgradingOSValue); + /// The Compute Node is deallocated. + public static BatchNodeState Deallocated { get; } = new BatchNodeState(DeallocatedValue); + /// The Compute Node is deallocating. + public static BatchNodeState Deallocating { get; } = new BatchNodeState(DeallocatingValue); /// Determines if two values are the same. public static bool operator ==(BatchNodeState left, BatchNodeState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs index 0f9fbcc2b158..e3d6007ed5fd 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs @@ -59,7 +59,7 @@ public BatchNodeUserCreateContent(string name) /// The user name of the Account. /// Whether the Account should be an administrator on the Compute Node. The default value is false. /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. - /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. + /// The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). /// Keeps track of any properties unknown to the library. internal BatchNodeUserCreateContent(string name, bool? isAdmin, DateTimeOffset? expiryTime, string password, string sshPublicKey, IDictionary serializedAdditionalRawData) @@ -83,7 +83,7 @@ internal BatchNodeUserCreateContent() public bool? IsAdmin { get; set; } /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. public DateTimeOffset? ExpiryTime { get; set; } - /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. + /// The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. public string Password { get; set; } /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). public string SshPublicKey { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs index 8ebac642c3d5..9741f08b6208 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs @@ -51,7 +51,7 @@ public BatchNodeUserUpdateContent() } /// Initializes a new instance of . - /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. + /// The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed. /// Keeps track of any properties unknown to the library. @@ -63,7 +63,7 @@ internal BatchNodeUserUpdateContent(string password, DateTimeOffset? expiryTime, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. + /// The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. public string Password { get; set; } /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. public DateTimeOffset? ExpiryTime { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs index 4cbd3bee1478..0f1a83eac5d7 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs @@ -67,7 +67,7 @@ internal BatchPool() /// The time at which the Pool entered its current state. /// Whether the Pool is resizing. /// The time at which the Pool entered its current allocation state. - /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). /// The virtual machine configuration for the Pool. This property must be specified. /// The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. /// A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady. @@ -88,7 +88,7 @@ internal BatchPool() /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. /// The list of user Accounts to be created on each Compute Node in the Pool. /// A list of name-value pairs associated with the Pool as metadata. - /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the BatchPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// The desired node communication mode for the pool. If omitted, the default value is Default. @@ -157,7 +157,7 @@ internal BatchPool(string id, string displayName, string url, string eTag, DateT public AllocationState? AllocationState { get; } /// The time at which the Pool entered its current allocation state. public DateTimeOffset? AllocationStateTransitionTime { get; } - /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). public string VmSize { get; } /// The virtual machine configuration for the Pool. This property must be specified. public VirtualMachineConfiguration VirtualMachineConfiguration { get; } @@ -199,7 +199,7 @@ internal BatchPool(string id, string displayName, string url, string eTag, DateT public IReadOnlyList UserAccounts { get; } /// A list of name-value pairs associated with the Pool as metadata. public IReadOnlyList Metadata { get; } - /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the BatchPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. public BatchPoolStatistics Stats { get; } /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. public IReadOnlyList MountConfiguration { get; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs index 13446bd47d3c..b3b15b6404d6 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs @@ -51,7 +51,7 @@ public BatchPoolEnableAutoScaleContent() } /// Initializes a new instance of . - /// The formula for the desired number of Compute Nodes in the Pool. The formula is checked for validity before it is applied to the Pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. /// Keeps track of any properties unknown to the library. internal BatchPoolEnableAutoScaleContent(string autoScaleFormula, TimeSpan? autoScaleEvaluationInterval, IDictionary serializedAdditionalRawData) @@ -61,7 +61,7 @@ internal BatchPoolEnableAutoScaleContent(string autoScaleFormula, TimeSpan? auto _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The formula for the desired number of Compute Nodes in the Pool. The formula is checked for validity before it is applied to the Pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. public string AutoScaleFormula { get; set; } /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. public TimeSpan? AutoScaleEvaluationInterval { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs index b89f8e7df1cd..3e2d717a256e 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs @@ -46,7 +46,7 @@ public partial class BatchPoolEvaluateAutoScaleContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling). /// is null. public BatchPoolEvaluateAutoScaleContent(string autoScaleFormula) { @@ -56,7 +56,7 @@ public BatchPoolEvaluateAutoScaleContent(string autoScaleFormula) } /// Initializes a new instance of . - /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling). /// Keeps track of any properties unknown to the library. internal BatchPoolEvaluateAutoScaleContent(string autoScaleFormula, IDictionary serializedAdditionalRawData) { @@ -69,7 +69,7 @@ internal BatchPoolEvaluateAutoScaleContent() { } - /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling). public string AutoScaleFormula { get; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs index 758fe6016c02..26540e39b9fc 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs @@ -46,7 +46,7 @@ public partial class BatchPoolSpecification private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). /// is null. public BatchPoolSpecification(string vmSize) { @@ -61,8 +61,8 @@ public BatchPoolSpecification(string vmSize) /// Initializes a new instance of . /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. - /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). - /// The virtual machine configuration for the Pool. This property must be specified if the Pool needs to be created with Azure IaaS VMs. If it is not specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The virtual machine configuration for the Pool. This property must be specified. /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. /// The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). @@ -115,9 +115,9 @@ internal BatchPoolSpecification() /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. public string DisplayName { get; set; } - /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). public string VmSize { get; set; } - /// The virtual machine configuration for the Pool. This property must be specified if the Pool needs to be created with Azure IaaS VMs. If it is not specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The virtual machine configuration for the Pool. This property must be specified. public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. public int? TaskSlotsPerNode { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs index ec85cc71f76f..566169b705d0 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs @@ -34,6 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BatchPoolUpdateContent)} does not support writing '{format}' format."); } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + } + if (Optional.IsDefined(EnableInterNodeCommunication)) + { + writer.WritePropertyName("enableInterNodeCommunication"u8); + writer.WriteBooleanValue(EnableInterNodeCommunication.Value); + } if (Optional.IsDefined(StartTask)) { writer.WritePropertyName("startTask"u8); @@ -59,11 +74,67 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(VirtualMachineConfiguration)) + { + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + } if (Optional.IsDefined(TargetNodeCommunicationMode)) { writer.WritePropertyName("targetNodeCommunicationMode"u8); writer.WriteStringValue(TargetNodeCommunicationMode.Value.ToString()); } + if (Optional.IsDefined(TaskSlotsPerNode)) + { + writer.WritePropertyName("taskSlotsPerNode"u8); + writer.WriteNumberValue(TaskSlotsPerNode.Value); + } + if (Optional.IsDefined(TaskSchedulingPolicy)) + { + writer.WritePropertyName("taskSchedulingPolicy"u8); + writer.WriteObjectValue(TaskSchedulingPolicy, options); + } + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsCollectionDefined(ResourceTags)) + { + writer.WritePropertyName("resourceTags"u8); + writer.WriteStartObject(); + foreach (var item in ResourceTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(UserAccounts)) + { + writer.WritePropertyName("userAccounts"u8); + writer.WriteStartArray(); + foreach (var item in UserAccounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MountConfiguration)) + { + writer.WritePropertyName("mountConfiguration"u8); + writer.WriteStartArray(); + foreach (var item in MountConfiguration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(UpgradePolicy)) + { + writer.WritePropertyName("upgradePolicy"u8); + writer.WriteObjectValue(UpgradePolicy, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -101,14 +172,44 @@ internal static BatchPoolUpdateContent DeserializeBatchPoolUpdateContent(JsonEle { return null; } + string displayName = default; + string vmSize = default; + bool? enableInterNodeCommunication = default; BatchStartTask startTask = default; IList applicationPackageReferences = default; IList metadata = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; BatchNodeCommunicationMode? targetNodeCommunicationMode = default; + int? taskSlotsPerNode = default; + BatchTaskSchedulingPolicy taskSchedulingPolicy = default; + NetworkConfiguration networkConfiguration = default; + IDictionary resourceTags = default; + IList userAccounts = default; + IList mountConfiguration = default; + UpgradePolicy upgradePolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("enableInterNodeCommunication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableInterNodeCommunication = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("startTask"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -146,6 +247,15 @@ internal static BatchPoolUpdateContent DeserializeBatchPoolUpdateContent(JsonEle metadata = array; continue; } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } if (property.NameEquals("targetNodeCommunicationMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -155,13 +265,107 @@ internal static BatchPoolUpdateContent DeserializeBatchPoolUpdateContent(JsonEle targetNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); continue; } + if (property.NameEquals("taskSlotsPerNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSlotsPerNode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("taskSchedulingPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSchedulingPolicy = BatchTaskSchedulingPolicy.DeserializeBatchTaskSchedulingPolicy(property.Value, options); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("resourceTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + resourceTags = dictionary; + continue; + } + if (property.NameEquals("userAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UserAccount.DeserializeUserAccount(item, options)); + } + userAccounts = array; + continue; + } + if (property.NameEquals("mountConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Batch.MountConfiguration.DeserializeMountConfiguration(item, options)); + } + mountConfiguration = array; + continue; + } + if (property.NameEquals("upgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePolicy = UpgradePolicy.DeserializeUpgradePolicy(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new BatchPoolUpdateContent(startTask, applicationPackageReferences ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingList(), targetNodeCommunicationMode, serializedAdditionalRawData); + return new BatchPoolUpdateContent( + displayName, + vmSize, + enableInterNodeCommunication, + startTask, + applicationPackageReferences ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), + virtualMachineConfiguration, + targetNodeCommunicationMode, + taskSlotsPerNode, + taskSchedulingPolicy, + networkConfiguration, + resourceTags ?? new ChangeTrackingDictionary(), + userAccounts ?? new ChangeTrackingList(), + mountConfiguration ?? new ChangeTrackingList(), + upgradePolicy, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs index 1300eb052c5c..9e84325fdb5d 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs @@ -50,30 +50,77 @@ public BatchPoolUpdateContent() { ApplicationPackageReferences = new ChangeTrackingList(); Metadata = new ChangeTrackingList(); + ResourceTags = new ChangeTrackingDictionary(); + UserAccounts = new ChangeTrackingList(); + MountConfiguration = new ChangeTrackingList(); } /// Initializes a new instance of . + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. This field can be updated only when the pool is empty. + /// The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).<br /><br />This field can be updated only when the pool is empty. + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.<br /><br />This field can be updated only when the pool is empty. /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged. /// A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged. /// A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. + /// The virtual machine configuration for the Pool. This property must be specified.<br /><br />This field can be updated only when the pool is empty. /// The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged. + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.<br /><br />This field can be updated only when the pool is empty. + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.<br /><br />This field can be updated only when the pool is empty. + /// The network configuration for the Pool. This field can be updated only when the pool is empty. + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.<br /><br />This field can be updated only when the pool is empty. + /// The list of user Accounts to be created on each Compute Node in the Pool. This field can be updated only when the pool is empty. + /// Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.<br /><br />This field can be updated only when the pool is empty. + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.<br /><br />This field can be updated only when the pool is empty. /// Keeps track of any properties unknown to the library. - internal BatchPoolUpdateContent(BatchStartTask startTask, IList applicationPackageReferences, IList metadata, BatchNodeCommunicationMode? targetNodeCommunicationMode, IDictionary serializedAdditionalRawData) + internal BatchPoolUpdateContent(string displayName, string vmSize, bool? enableInterNodeCommunication, BatchStartTask startTask, IList applicationPackageReferences, IList metadata, VirtualMachineConfiguration virtualMachineConfiguration, BatchNodeCommunicationMode? targetNodeCommunicationMode, int? taskSlotsPerNode, BatchTaskSchedulingPolicy taskSchedulingPolicy, NetworkConfiguration networkConfiguration, IDictionary resourceTags, IList userAccounts, IList mountConfiguration, UpgradePolicy upgradePolicy, IDictionary serializedAdditionalRawData) { + DisplayName = displayName; + VmSize = vmSize; + EnableInterNodeCommunication = enableInterNodeCommunication; StartTask = startTask; ApplicationPackageReferences = applicationPackageReferences; Metadata = metadata; + VirtualMachineConfiguration = virtualMachineConfiguration; TargetNodeCommunicationMode = targetNodeCommunicationMode; + TaskSlotsPerNode = taskSlotsPerNode; + TaskSchedulingPolicy = taskSchedulingPolicy; + NetworkConfiguration = networkConfiguration; + ResourceTags = resourceTags; + UserAccounts = userAccounts; + MountConfiguration = mountConfiguration; + UpgradePolicy = upgradePolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. This field can be updated only when the pool is empty. + public string DisplayName { get; set; } + /// The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).<br /><br />This field can be updated only when the pool is empty. + public string VmSize { get; set; } + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.<br /><br />This field can be updated only when the pool is empty. + public bool? EnableInterNodeCommunication { get; set; } /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged. public BatchStartTask StartTask { get; set; } /// A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged. public IList ApplicationPackageReferences { get; } /// A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. public IList Metadata { get; } + /// The virtual machine configuration for the Pool. This property must be specified.<br /><br />This field can be updated only when the pool is empty. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } /// The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged. public BatchNodeCommunicationMode? TargetNodeCommunicationMode { get; set; } + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.<br /><br />This field can be updated only when the pool is empty. + public int? TaskSlotsPerNode { get; set; } + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.<br /><br />This field can be updated only when the pool is empty. + public BatchTaskSchedulingPolicy TaskSchedulingPolicy { get; set; } + /// The network configuration for the Pool. This field can be updated only when the pool is empty. + public NetworkConfiguration NetworkConfiguration { get; set; } + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.<br /><br />This field can be updated only when the pool is empty. + public IDictionary ResourceTags { get; } + /// The list of user Accounts to be created on each Compute Node in the Pool. This field can be updated only when the pool is empty. + public IList UserAccounts { get; } + /// Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.<br /><br />This field can be updated only when the pool is empty. + public IList MountConfiguration { get; } + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.<br /><br />This field can be updated only when the pool is empty. + public UpgradePolicy UpgradePolicy { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs index c28463c07907..66fee7143432 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs @@ -49,7 +49,7 @@ public partial class BatchPoolUsageMetrics /// The ID of the Pool whose metrics are aggregated in this entry. /// The start time of the aggregation interval covered by this entry. /// The end time of the aggregation interval covered by this entry. - /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). /// The total core hours used in the Pool during this aggregation interval. /// or is null. internal BatchPoolUsageMetrics(string poolId, DateTimeOffset startTime, DateTimeOffset endTime, string vmSize, float totalCoreHours) @@ -68,7 +68,7 @@ internal BatchPoolUsageMetrics(string poolId, DateTimeOffset startTime, DateTime /// The ID of the Pool whose metrics are aggregated in this entry. /// The start time of the aggregation interval covered by this entry. /// The end time of the aggregation interval covered by this entry. - /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). /// The total core hours used in the Pool during this aggregation interval. /// Keeps track of any properties unknown to the library. internal BatchPoolUsageMetrics(string poolId, DateTimeOffset startTime, DateTimeOffset endTime, string vmSize, float totalCoreHours, IDictionary serializedAdditionalRawData) @@ -92,7 +92,7 @@ internal BatchPoolUsageMetrics() public DateTimeOffset StartTime { get; } /// The end time of the aggregation interval covered by this entry. public DateTimeOffset EndTime { get; } - /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). public string VmSize { get; } /// The total core hours used in the Pool during this aggregation interval. public float TotalCoreHours { get; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs index d83549ff0698..4adb269470aa 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs @@ -60,7 +60,7 @@ public partial class BatchStartTask private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// is null. public BatchStartTask(string commandLine) { @@ -72,7 +72,7 @@ public BatchStartTask(string commandLine) } /// Initializes a new instance of . - /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. /// A list of environment variable settings for the StartTask. @@ -97,7 +97,7 @@ internal BatchStartTask() { } - /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). public string CommandLine { get; set; } /// The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. public BatchTaskContainerSettings ContainerSettings { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs index 3f38ef61f36d..db112fb7f7ae 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs @@ -76,7 +76,7 @@ public BatchTask() /// The time at which the Task entered its current state. /// The previous state of the Task. This property is not set if the Task is in its initial Active state. /// The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. @@ -147,7 +147,7 @@ internal BatchTask(string id, string displayName, string url, string eTag, DateT public BatchTaskState? PreviousState { get; } /// The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. public DateTimeOffset? PreviousStateTransitionTime { get; } - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). public string CommandLine { get; } /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. public BatchTaskContainerSettings ContainerSettings { get; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs index 19f0339c4bc8..b7d45b7c030a 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs @@ -51,6 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workingDirectory"u8); writer.WriteStringValue(WorkingDirectory.Value.ToString()); } + if (Optional.IsCollectionDefined(ContainerHostBatchBindMounts)) + { + writer.WritePropertyName("containerHostBatchBindMounts"u8); + writer.WriteStartArray(); + foreach (var item in ContainerHostBatchBindMounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -92,6 +102,7 @@ internal static BatchTaskContainerSettings DeserializeBatchTaskContainerSettings string imageName = default; ContainerRegistryReference registry = default; ContainerWorkingDirectory? workingDirectory = default; + IList containerHostBatchBindMounts = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -124,13 +135,33 @@ internal static BatchTaskContainerSettings DeserializeBatchTaskContainerSettings workingDirectory = new ContainerWorkingDirectory(property.Value.GetString()); continue; } + if (property.NameEquals("containerHostBatchBindMounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerHostBatchBindMountEntry.DeserializeContainerHostBatchBindMountEntry(item, options)); + } + containerHostBatchBindMounts = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new BatchTaskContainerSettings(containerRunOptions, imageName, registry, workingDirectory, serializedAdditionalRawData); + return new BatchTaskContainerSettings( + containerRunOptions, + imageName, + registry, + workingDirectory, + containerHostBatchBindMounts ?? new ChangeTrackingList(), + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs index 9ecfdf09e22b..f528edcc8753 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs @@ -53,6 +53,7 @@ public BatchTaskContainerSettings(string imageName) Argument.AssertNotNull(imageName, nameof(imageName)); ImageName = imageName; + ContainerHostBatchBindMounts = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -60,13 +61,15 @@ public BatchTaskContainerSettings(string imageName) /// The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default. /// The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation. /// The location of the container Task working directory. The default is 'taskWorkingDirectory'. + /// The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty. /// Keeps track of any properties unknown to the library. - internal BatchTaskContainerSettings(string containerRunOptions, string imageName, ContainerRegistryReference registry, ContainerWorkingDirectory? workingDirectory, IDictionary serializedAdditionalRawData) + internal BatchTaskContainerSettings(string containerRunOptions, string imageName, ContainerRegistryReference registry, ContainerWorkingDirectory? workingDirectory, IList containerHostBatchBindMounts, IDictionary serializedAdditionalRawData) { ContainerRunOptions = containerRunOptions; ImageName = imageName; Registry = registry; WorkingDirectory = workingDirectory; + ContainerHostBatchBindMounts = containerHostBatchBindMounts; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -83,5 +86,7 @@ internal BatchTaskContainerSettings() public ContainerRegistryReference Registry { get; set; } /// The location of the container Task working directory. The default is 'taskWorkingDirectory'. public ContainerWorkingDirectory? WorkingDirectory { get; set; } + /// The paths you want to mounted to container task. If this array is null or be not present, container task will mount entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty. + public IList ContainerHostBatchBindMounts { get; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs index 88818560e6b8..35ab3e0f2bc8 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs @@ -47,7 +47,7 @@ public partial class BatchTaskCreateContent /// Initializes a new instance of . /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). /// or is null. public BatchTaskCreateContent(string id, string commandLine) { @@ -66,7 +66,7 @@ public BatchTaskCreateContent(string id, string commandLine) /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. /// How the Batch service should respond when the Task completes. - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. @@ -112,7 +112,7 @@ internal BatchTaskCreateContent() public string DisplayName { get; set; } /// How the Batch service should respond when the Task completes. public ExitConditions ExitConditions { get; set; } - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). public string CommandLine { get; } /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. public BatchTaskContainerSettings ContainerSettings { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs index 51e40bc9f43a..d8c0619116ff 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs @@ -60,7 +60,7 @@ public static BatchErrorDetail BatchErrorDetail(string key = null, string value /// The ID of the Pool whose metrics are aggregated in this entry. /// The start time of the aggregation interval covered by this entry. /// The end time of the aggregation interval covered by this entry. - /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). /// The total core hours used in the Pool during this aggregation interval. /// A new instance for mocking. public static BatchPoolUsageMetrics BatchPoolUsageMetrics(string poolId = null, DateTimeOffset startTime = default, DateTimeOffset endTime = default, string vmSize = null, float totalCoreHours = default) @@ -137,10 +137,12 @@ public static BatchPoolCreateContent BatchPoolCreateContent(string id = null, st /// The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. /// The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. /// The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. - /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. /// The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. + /// The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. + /// The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call. /// A new instance for mocking. - public static ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null) + public static ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null, string sharedGalleryImageId = null, string communityGalleryImageId = null) { return new ImageReference( publisher, @@ -149,6 +151,8 @@ public static ImageReference ImageReference(string publisher = null, string offe version, virtualMachineImageId, exactVersion, + sharedGalleryImageId, + communityGalleryImageId, serializedAdditionalRawData: null); } @@ -163,7 +167,7 @@ public static ImageReference ImageReference(string publisher = null, string offe /// The time at which the Pool entered its current state. /// Whether the Pool is resizing. /// The time at which the Pool entered its current allocation state. - /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). /// The virtual machine configuration for the Pool. This property must be specified. /// The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. /// A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady. @@ -184,7 +188,7 @@ public static ImageReference ImageReference(string publisher = null, string offe /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. /// The list of user Accounts to be created on each Compute Node in the Pool. /// A list of name-value pairs associated with the Pool as metadata. - /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the BatchPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// The desired node communication mode for the pool. If omitted, the default value is Default. @@ -413,10 +417,12 @@ public static BatchPoolNodeCounts BatchPoolNodeCounts(string poolId = null, Batc /// The number of Compute Nodes in the unknown state. /// The number of Compute Nodes in the unusable state. /// The number of Compute Nodes in the waitingForStartTask state. + /// The number of Compute Nodes in the deallocated state. + /// The number of Compute Nodes in the deallocating state. /// The total number of Compute Nodes. /// The number of Compute Nodes in the upgradingOS state. /// A new instance for mocking. - public static BatchNodeCounts BatchNodeCounts(int creating = default, int idle = default, int offline = default, int preempted = default, int rebooting = default, int reimaging = default, int running = default, int starting = default, int startTaskFailed = default, int leavingPool = default, int unknown = default, int unusable = default, int waitingForStartTask = default, int total = default, int upgradingOs = default) + public static BatchNodeCounts BatchNodeCounts(int creating = default, int idle = default, int offline = default, int preempted = default, int rebooting = default, int reimaging = default, int running = default, int starting = default, int startTaskFailed = default, int leavingPool = default, int unknown = default, int unusable = default, int waitingForStartTask = default, int deallocated = default, int deallocating = default, int total = default, int upgradingOs = default) { return new BatchNodeCounts( creating, @@ -432,6 +438,8 @@ public static BatchNodeCounts BatchNodeCounts(int creating = default, int idle = unknown, unusable, waitingForStartTask, + deallocated, + deallocating, total, upgradingOs, serializedAdditionalRawData: null); @@ -463,7 +471,7 @@ public static BatchNodeCounts BatchNodeCounts(int creating = default, int idle = /// The network configuration for the Job. /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. /// The execution information for the Job. - /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. /// A new instance for mocking. public static BatchJob BatchJob(string id = null, string displayName = null, bool? usesTaskDependencies = null, string url = null, string eTag = null, DateTimeOffset? lastModified = null, DateTimeOffset? creationTime = null, BatchJobState? state = null, DateTimeOffset? stateTransitionTime = null, BatchJobState? previousState = null, DateTimeOffset? previousStateTransitionTime = null, int? priority = null, bool? allowTaskPreemption = null, int? maxParallelTasks = null, BatchJobConstraints constraints = null, BatchJobManagerTask jobManagerTask = null, BatchJobPreparationTask jobPreparationTask = null, BatchJobReleaseTask jobReleaseTask = null, IEnumerable commonEnvironmentSettings = null, BatchPoolInfo poolInfo = null, OnAllBatchTasksComplete? onAllTasksComplete = null, OnBatchTaskFailure? onTaskFailure = null, BatchJobNetworkConfiguration networkConfiguration = null, IEnumerable metadata = null, BatchJobExecutionInfo executionInfo = null, BatchJobStatistics stats = null) { @@ -871,7 +879,7 @@ public static BatchJobScheduleCreateContent BatchJobScheduleCreateContent(string /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. /// How the Batch service should respond when the Task completes. - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. @@ -924,7 +932,7 @@ public static BatchTaskCreateContent BatchTaskCreateContent(string id = null, st /// The time at which the Task entered its current state. /// The previous state of the Task. This property is not set if the Task is in its initial Active state. /// The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. - /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables). /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. @@ -1137,7 +1145,7 @@ public static BatchNodeFile BatchNodeFile(string name = null, string url = null, /// The content type of the file. /// The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. /// A new instance for mocking. - public static FileProperties FileProperties(DateTimeOffset? creationTime = null, DateTimeOffset lastModified = default, long contentLength = default, string contentType = null, string fileMode = null) + public static FileProperties FileProperties(DateTimeOffset? creationTime = null, DateTimeOffset lastModified = default, string contentLength = null, string contentType = null, string fileMode = null) { return new FileProperties( creationTime, @@ -1152,7 +1160,7 @@ public static FileProperties FileProperties(DateTimeOffset? creationTime = null, /// The user name of the Account. /// Whether the Account should be an administrator on the Compute Node. The default value is false. /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. - /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. + /// The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). /// A new instance for mocking. public static BatchNodeUserCreateContent BatchNodeUserCreateContent(string name = null, bool? isAdmin = null, DateTimeOffset? expiryTime = null, string password = null, string sshPublicKey = null) @@ -1176,7 +1184,7 @@ public static BatchNodeUserCreateContent BatchNodeUserCreateContent(string name /// The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. /// The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. /// An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. - /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes). /// The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. /// The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. /// The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostBatchBindMountEntry.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostBatchBindMountEntry.Serialization.cs new file mode 100644 index 000000000000..7136f9b4e1ff --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostBatchBindMountEntry.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ContainerHostBatchBindMountEntry : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerHostBatchBindMountEntry)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source.Value.ToString()); + } + if (Optional.IsDefined(IsReadOnly)) + { + writer.WritePropertyName("isReadOnly"u8); + writer.WriteBooleanValue(IsReadOnly.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerHostBatchBindMountEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerHostBatchBindMountEntry)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerHostBatchBindMountEntry(document.RootElement, options); + } + + internal static ContainerHostBatchBindMountEntry DeserializeContainerHostBatchBindMountEntry(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ContainerHostDataPath? source = default; + bool? isReadOnly = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + source = new ContainerHostDataPath(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReadOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReadOnly = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerHostBatchBindMountEntry(source, isReadOnly, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerHostBatchBindMountEntry)} does not support writing '{options.Format}' format."); + } + } + + ContainerHostBatchBindMountEntry IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerHostBatchBindMountEntry(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerHostBatchBindMountEntry)} 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 ContainerHostBatchBindMountEntry FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeContainerHostBatchBindMountEntry(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/batch/Azure.Compute.Batch/src/Generated/ContainerHostBatchBindMountEntry.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostBatchBindMountEntry.cs new file mode 100644 index 000000000000..129e36e79f3d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostBatchBindMountEntry.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.Compute.Batch +{ + /// The entry of path and mount mode you want to mount into task container. + public partial class ContainerHostBatchBindMountEntry + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 ContainerHostBatchBindMountEntry() + { + } + + /// Initializes a new instance of . + /// The path which be mounted to container customer can select. + /// Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. + /// Keeps track of any properties unknown to the library. + internal ContainerHostBatchBindMountEntry(ContainerHostDataPath? source, bool? isReadOnly, IDictionary serializedAdditionalRawData) + { + Source = source; + IsReadOnly = isReadOnly; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The path which be mounted to container customer can select. + public ContainerHostDataPath? Source { get; set; } + /// Mount this source path as read-only mode or not. Default value is false (read/write mode). For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users within the container will not be able to modify the path. + public bool? IsReadOnly { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostDataPath.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostDataPath.cs new file mode 100644 index 000000000000..db0708edc775 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerHostDataPath.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.Compute.Batch +{ + /// The paths which will be mounted to container task's container. + public readonly partial struct ContainerHostDataPath : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerHostDataPath(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SharedValue = "Shared"; + private const string StartupValue = "Startup"; + private const string VfsMountsValue = "VfsMounts"; + private const string TaskValue = "Task"; + private const string JobPrepValue = "JobPrep"; + private const string ApplicationsValue = "Applications"; + + /// The path for multi-instances task to shared their files. + public static ContainerHostDataPath Shared { get; } = new ContainerHostDataPath(SharedValue); + /// The path for start task. + public static ContainerHostDataPath Startup { get; } = new ContainerHostDataPath(StartupValue); + /// The path contains all virtual file systems are mounted on this node. + public static ContainerHostDataPath VfsMounts { get; } = new ContainerHostDataPath(VfsMountsValue); + /// The task path. + public static ContainerHostDataPath Task { get; } = new ContainerHostDataPath(TaskValue); + /// The job-prep task path. + public static ContainerHostDataPath JobPrep { get; } = new ContainerHostDataPath(JobPrepValue); + /// The applications path. + public static ContainerHostDataPath Applications { get; } = new ContainerHostDataPath(ApplicationsValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerHostDataPath left, ContainerHostDataPath right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerHostDataPath left, ContainerHostDataPath right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerHostDataPath(string value) => new ContainerHostDataPath(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerHostDataPath other && Equals(other); + /// + public bool Equals(ContainerHostDataPath 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/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs index 4a31115ce568..0729c6609146 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs @@ -10,7 +10,7 @@ namespace Azure.Compute.Batch { - /// AccessDiffDiskPlacementScope enums. + /// Specifies the ephemeral disk placement for operating system disk for all compute nodes (VMs) in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. public readonly partial struct DiffDiskPlacement : IEquatable { private readonly string _value; diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs index 03ec91b162ed..0ae2222fd149 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs @@ -54,7 +54,7 @@ public DiffDiskSettings() } /// Initializes a new instance of . - /// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + /// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. /// Keeps track of any properties unknown to the library. internal DiffDiskSettings(DiffDiskPlacement? placement, IDictionary serializedAdditionalRawData) { @@ -62,7 +62,7 @@ internal DiffDiskSettings(DiffDiskPlacement? placement, IDictionary Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + /// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. public DiffDiskPlacement? Placement { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs index 1a8f6a27f6ca..2ad49f0b0d74 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs @@ -56,7 +56,7 @@ public DiskEncryptionConfiguration() } /// Initializes a new instance of . - /// The list of disk targets Batch Service will encrypt on the compute node. If omitted, no disks on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + /// The list of disk targets Batch Service will encrypt on the compute node. The list of disk targets Batch Service will encrypt on the compute node. /// Keeps track of any properties unknown to the library. internal DiskEncryptionConfiguration(IList targets, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal DiskEncryptionConfiguration(IList targets, IDicti _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of disk targets Batch Service will encrypt on the compute node. If omitted, no disks on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + /// The list of disk targets Batch Service will encrypt on the compute node. The list of disk targets Batch Service will encrypt on the compute node. public IList Targets { get; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml b/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml index 105b11993153..2cc4a0efd024 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml @@ -151,7 +151,10 @@ BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "standard_ }, Caching = CachingType.ReadWrite, DiskSizeGB = 100, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), + ManagedDisk = new ManagedDisk + { + StorageAccountType = StorageAccountType.StandardSSDLRS, + }, }, }, ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -427,7 +430,10 @@ BatchPoolCreateContent pool = new BatchPoolCreateContent("mypool001", "standard_ }, Caching = CachingType.ReadWrite, DiskSizeGB = 100, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), + ManagedDisk = new ManagedDisk + { + StorageAccountType = StorageAccountType.StandardSSDLRS, + }, }, }, ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -2109,7 +2115,7 @@ Response response = client.RemoveNodes("poolId", content); Console.WriteLine(response.Status); ]]> - + This sample shows how to call DeleteJobAsync. - + This sample shows how to call DeleteJob. - + This sample shows how to call TerminateJobAsync. - + This sample shows how to call TerminateJob. - + This sample shows how to call TerminateJobAsync. - + This sample shows how to call TerminateJob. - + This sample shows how to call DeleteJobScheduleAsync. - + This sample shows how to call DeleteJobSchedule. - + This sample shows how to call TerminateJobScheduleAsync. - + This sample shows how to call TerminateJobSchedule. "); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") +{ + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry + { + Source = ContainerHostDataPath.Task, + IsReadOnly = true, + }}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, +}; +Response response = await client.CreateTaskAsync("jobId", task); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") +{ + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry + { + Source = ContainerHostDataPath.Task, + IsReadOnly = true, + }, new ContainerHostBatchBindMountEntry + { + Source = ContainerHostDataPath.Task, + IsReadOnly = true, + }}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, +}; +Response response = await client.CreateTaskAsync("jobId", task); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "cmd /c exit 3") { ExitConditions = new ExitConditions @@ -4172,6 +4308,64 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") +{ + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry + { + Source = ContainerHostDataPath.Task, + IsReadOnly = true, + }}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, +}; +Response response = client.CreateTask("jobId", task); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") +{ + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry + { + Source = ContainerHostDataPath.Task, + IsReadOnly = true, + }, new ContainerHostBatchBindMountEntry + { + Source = ContainerHostDataPath.Task, + IsReadOnly = true, + }}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, +}; +Response response = client.CreateTask("jobId", task); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "cmd /c exit 3") { ExitConditions = new ExitConditions @@ -4256,6 +4450,81 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { + new + { + source = "Task", + isReadOnly = true, + } + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, +}); +Response response = await client.CreateTaskAsync("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { + new + { + source = "Task", + isReadOnly = true, + }, + new + { + source = "Task", + isReadOnly = true, + } + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, +}); +Response response = await client.CreateTaskAsync("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { id = "taskId", @@ -4356,6 +4625,81 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); BatchClient client = new BatchClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { + new + { + source = "Task", + isReadOnly = true, + } + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, +}); +Response response = client.CreateTask("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { + new + { + source = "Task", + isReadOnly = true, + }, + new + { + source = "Task", + isReadOnly = true, + } + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, +}); +Response response = client.CreateTask("jobId", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { id = "taskId", @@ -5282,6 +5626,132 @@ BatchClient client = new BatchClient(endpoint, credential); using RequestContent content = null; Response response = client.RebootNode("poolId", "tvm-1695681911_1-20161122t193202z", content); +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StartNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.StartNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StartNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.StartNode("poolId", "tvm-1695681911_1-20161122t193202z"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReimageNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.ReimageNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); +]]> + + + +This sample shows how to call ReimageNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.ReimageNode("poolId", "tvm-1695681911_1-20161122t193202z"); +]]> + + + +This sample shows how to call ReimageNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = await client.ReimageNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReimageNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = client.ReimageNode("poolId", "tvm-1695681911_1-20161122t193202z", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeallocateNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeallocateNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); +]]> + + + +This sample shows how to call DeallocateNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeallocateNode("poolId", "tvm-1695681911_1-20161122t193202z"); +]]> + + + +This sample shows how to call DeallocateNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = await client.DeallocateNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeallocateNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = client.DeallocateNode("poolId", "tvm-1695681911_1-20161122t193202z", content); + Console.WriteLine(response.Status); ]]> diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs index e51c04c24a8e..e55837402cca 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs @@ -42,7 +42,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("lastModified"u8); writer.WriteStringValue(LastModified, "O"); writer.WritePropertyName("contentLength"u8); - writer.WriteNumberValue(ContentLength); + writer.WriteStringValue(ContentLength); if (Optional.IsDefined(ContentType)) { writer.WritePropertyName("contentType"u8); @@ -92,7 +92,7 @@ internal static FileProperties DeserializeFileProperties(JsonElement element, Mo } DateTimeOffset? creationTime = default; DateTimeOffset lastModified = default; - long contentLength = default; + string contentLength = default; string contentType = default; string fileMode = default; IDictionary serializedAdditionalRawData = default; @@ -115,7 +115,7 @@ internal static FileProperties DeserializeFileProperties(JsonElement element, Mo } if (property.NameEquals("contentLength"u8)) { - contentLength = property.Value.GetInt64(); + contentLength = property.Value.GetString(); continue; } if (property.NameEquals("contentType"u8)) diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs index 62a026bccce2..112b2425a776 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs @@ -48,8 +48,11 @@ public partial class FileProperties /// Initializes a new instance of . /// The time at which the file was last modified. /// The length of the file. - internal FileProperties(DateTimeOffset lastModified, long contentLength) + /// is null. + internal FileProperties(DateTimeOffset lastModified, string contentLength) { + Argument.AssertNotNull(contentLength, nameof(contentLength)); + LastModified = lastModified; ContentLength = contentLength; } @@ -61,7 +64,7 @@ internal FileProperties(DateTimeOffset lastModified, long contentLength) /// The content type of the file. /// The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. /// Keeps track of any properties unknown to the library. - internal FileProperties(DateTimeOffset? creationTime, DateTimeOffset lastModified, long contentLength, string contentType, string fileMode, IDictionary serializedAdditionalRawData) + internal FileProperties(DateTimeOffset? creationTime, DateTimeOffset lastModified, string contentLength, string contentType, string fileMode, IDictionary serializedAdditionalRawData) { CreationTime = creationTime; LastModified = lastModified; @@ -81,7 +84,7 @@ internal FileProperties() /// The time at which the file was last modified. public DateTimeOffset LastModified { get; } /// The length of the file. - public long ContentLength { get; } + public string ContentLength { get; } /// The content type of the file. public string ContentType { get; } /// The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs index 236229f5bd9a..ba2303bceac3 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs @@ -64,6 +64,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("exactVersion"u8); writer.WriteStringValue(ExactVersion); } + if (Optional.IsDefined(SharedGalleryImageId)) + { + writer.WritePropertyName("sharedGalleryImageId"u8); + writer.WriteStringValue(SharedGalleryImageId); + } + if (Optional.IsDefined(CommunityGalleryImageId)) + { + writer.WritePropertyName("communityGalleryImageId"u8); + writer.WriteStringValue(CommunityGalleryImageId); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -107,6 +117,8 @@ internal static ImageReference DeserializeImageReference(JsonElement element, Mo string version = default; string virtualMachineImageId = default; string exactVersion = default; + string sharedGalleryImageId = default; + string communityGalleryImageId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -141,6 +153,16 @@ internal static ImageReference DeserializeImageReference(JsonElement element, Mo exactVersion = property.Value.GetString(); continue; } + if (property.NameEquals("sharedGalleryImageId"u8)) + { + sharedGalleryImageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("communityGalleryImageId"u8)) + { + communityGalleryImageId = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -154,6 +176,8 @@ internal static ImageReference DeserializeImageReference(JsonElement element, Mo version, virtualMachineImageId, exactVersion, + sharedGalleryImageId, + communityGalleryImageId, serializedAdditionalRawData); } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs index 6c5cb5fc883f..67fa3216c0de 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs @@ -59,10 +59,12 @@ public ImageReference() /// The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. /// The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. /// The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. - /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. /// The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. + /// The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. + /// The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call. /// Keeps track of any properties unknown to the library. - internal ImageReference(string publisher, string offer, string sku, string version, string virtualMachineImageId, string exactVersion, IDictionary serializedAdditionalRawData) + internal ImageReference(string publisher, string offer, string sku, string version, string virtualMachineImageId, string exactVersion, string sharedGalleryImageId, string communityGalleryImageId, IDictionary serializedAdditionalRawData) { Publisher = publisher; Offer = offer; @@ -70,6 +72,8 @@ internal ImageReference(string publisher, string offer, string sku, string versi Version = version; VirtualMachineImageId = virtualMachineImageId; ExactVersion = exactVersion; + SharedGalleryImageId = sharedGalleryImageId; + CommunityGalleryImageId = communityGalleryImageId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -81,9 +85,13 @@ internal ImageReference(string publisher, string offer, string sku, string versi public string Sku { get; set; } /// 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'. public string Version { get; set; } - /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. public string VirtualMachineImageId { get; set; } /// The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. public string ExactVersion { get; } + /// The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. + public string SharedGalleryImageId { get; set; } + /// The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call. + public string CommunityGalleryImageId { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs index 7dabe3fd9da0..ec5da9c432cd 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs @@ -51,7 +51,7 @@ public partial class InboundNatPool /// Initializes a new instance of . /// The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. /// The protocol of the endpoint. - /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. /// The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. /// The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. /// is null. @@ -70,7 +70,7 @@ public InboundNatPool(string name, InboundEndpointProtocol protocol, int backend /// Initializes a new instance of . /// The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. /// The protocol of the endpoint. - /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. /// The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. /// The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. /// A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. @@ -95,7 +95,7 @@ internal InboundNatPool() public string Name { get; set; } /// The protocol of the endpoint. public InboundEndpointProtocol Protocol { get; set; } - /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. public int BackendPort { get; set; } /// The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. public int FrontendPortRangeStart { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs index de2b43ad3a72..f94ca4219790 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs @@ -34,8 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedDisk)} does not support writing '{format}' format."); } - writer.WritePropertyName("storageAccountType"u8); - writer.WriteStringValue(StorageAccountType.ToString()); + if (Optional.IsDefined(StorageAccountType)) + { + writer.WritePropertyName("storageAccountType"u8); + writer.WriteStringValue(StorageAccountType.Value.ToString()); + } + if (Optional.IsDefined(SecurityProfile)) + { + writer.WritePropertyName("securityProfile"u8); + writer.WriteObjectValue(SecurityProfile, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,23 +81,37 @@ internal static ManagedDisk DeserializeManagedDisk(JsonElement element, ModelRea { return null; } - StorageAccountType storageAccountType = default; + StorageAccountType? storageAccountType = default; + VMDiskSecurityProfile securityProfile = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("storageAccountType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } storageAccountType = new StorageAccountType(property.Value.GetString()); continue; } + if (property.NameEquals("securityProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityProfile = VMDiskSecurityProfile.DeserializeVMDiskSecurityProfile(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedDisk(storageAccountType, serializedAdditionalRawData); + return new ManagedDisk(storageAccountType, securityProfile, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs index f8ada07e8f72..32a2f0e6cc65 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs @@ -46,27 +46,24 @@ public partial class ManagedDisk private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The storage account type for managed disk. - public ManagedDisk(StorageAccountType storageAccountType) + public ManagedDisk() { - StorageAccountType = storageAccountType; } /// Initializes a new instance of . /// The storage account type for managed disk. + /// Specifies the security profile settings for the managed disk. /// Keeps track of any properties unknown to the library. - internal ManagedDisk(StorageAccountType storageAccountType, IDictionary serializedAdditionalRawData) + internal ManagedDisk(StorageAccountType? storageAccountType, VMDiskSecurityProfile securityProfile, IDictionary serializedAdditionalRawData) { StorageAccountType = storageAccountType; + SecurityProfile = securityProfile; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ManagedDisk() - { - } - /// The storage account type for managed disk. - public StorageAccountType StorageAccountType { get; set; } + public StorageAccountType? StorageAccountType { get; set; } + /// Specifies the security profile settings for the managed disk. + public VMDiskSecurityProfile SecurityProfile { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs index e69a292a3501..90847b622aee 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs @@ -51,10 +51,10 @@ public NetworkConfiguration() } /// Initializes a new instance of . - /// The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. For Pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For Pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication, including ports 29876 and 29877. Also enable outbound connections to Azure Storage on port 443. For more details see: https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. /// The scope of dynamic vnet assignment. - /// The configuration for endpoints on Compute Nodes in the Batch Pool. Pool endpoint configuration is only supported on Pools with the virtualMachineConfiguration property. - /// The Public IPAddress configuration for Compute Nodes in the Batch Pool. Public IP configuration property is only supported on Pools with the virtualMachineConfiguration property. + /// The configuration for endpoints on Compute Nodes in the Batch Pool. + /// The Public IPAddress configuration for Compute Nodes in the Batch Pool. /// Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. /// Keeps track of any properties unknown to the library. internal NetworkConfiguration(string subnetId, DynamicVNetAssignmentScope? dynamicVNetAssignmentScope, BatchPoolEndpointConfiguration endpointConfiguration, PublicIpAddressConfiguration publicIpAddressConfiguration, bool? enableAcceleratedNetworking, IDictionary serializedAdditionalRawData) @@ -67,13 +67,13 @@ internal NetworkConfiguration(string subnetId, DynamicVNetAssignmentScope? dynam _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. For Pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For Pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. Only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication, including ports 29876 and 29877. Also enable outbound connections to Azure Storage on port 443. For more details see: https://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration. public string SubnetId { get; set; } /// The scope of dynamic vnet assignment. public DynamicVNetAssignmentScope? DynamicVNetAssignmentScope { get; set; } - /// The configuration for endpoints on Compute Nodes in the Batch Pool. Pool endpoint configuration is only supported on Pools with the virtualMachineConfiguration property. + /// The configuration for endpoints on Compute Nodes in the Batch Pool. public BatchPoolEndpointConfiguration EndpointConfiguration { get; set; } - /// The Public IPAddress configuration for Compute Nodes in the Batch Pool. Public IP configuration property is only supported on Pools with the virtualMachineConfiguration property. + /// The Public IPAddress configuration for Compute Nodes in the Batch Pool. public PublicIpAddressConfiguration PublicIpAddressConfiguration { get; set; } /// Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. public bool? EnableAcceleratedNetworking { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs index 44d0f78eef82..2271ff331361 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs @@ -60,7 +60,7 @@ public OutputFileBlobContainerDestination(string containerUrl) /// The destination blob or virtual directory within the Azure Storage container. If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name. /// The URL of the container within Azure Blob Storage to which to upload the file(s). If not using a managed identity, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. - /// A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types. + /// A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://learn.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. /// Keeps track of any properties unknown to the library. internal OutputFileBlobContainerDestination(string path, string containerUrl, BatchNodeIdentityReference identityReference, IList uploadHeaders, IDictionary serializedAdditionalRawData) { @@ -82,7 +82,7 @@ internal OutputFileBlobContainerDestination() public string ContainerUrl { get; set; } /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. public BatchNodeIdentityReference IdentityReference { get; set; } - /// A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types. + /// A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://learn.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types. public IList UploadHeaders { get; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityEncryptionTypes.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityEncryptionTypes.cs new file mode 100644 index 000000000000..2ab799148d35 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityEncryptionTypes.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.Compute.Batch +{ + /// SecurityEncryptionTypes enums. + public readonly partial struct SecurityEncryptionTypes : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SecurityEncryptionTypes(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NonPersistedTPMValue = "NonPersistedTPM"; + private const string VMGuestStateOnlyValue = "VMGuestStateOnly"; + + /// NonPersistedTPM. + public static SecurityEncryptionTypes NonPersistedTPM { get; } = new SecurityEncryptionTypes(NonPersistedTPMValue); + /// VMGuestStateOnly. + public static SecurityEncryptionTypes VMGuestStateOnly { get; } = new SecurityEncryptionTypes(VMGuestStateOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(SecurityEncryptionTypes left, SecurityEncryptionTypes right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SecurityEncryptionTypes left, SecurityEncryptionTypes right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SecurityEncryptionTypes(string value) => new SecurityEncryptionTypes(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SecurityEncryptionTypes other && Equals(other); + /// + public bool Equals(SecurityEncryptionTypes 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/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs index 4f81495d150a..d34a776e1368 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs @@ -46,7 +46,7 @@ public partial class SecurityProfile private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For more information on encryption at host requirements, please refer to https://learn.microsoft.com/azure/virtual-machines/disk-encryption#supported-vm-sizes. /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. /// is null. @@ -60,7 +60,7 @@ public SecurityProfile(bool encryptionAtHost, SecurityTypes securityType, UefiSe } /// Initializes a new instance of . - /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For more information on encryption at host requirements, please refer to https://learn.microsoft.com/azure/virtual-machines/disk-encryption#supported-vm-sizes. /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. /// Keeps track of any properties unknown to the library. @@ -77,7 +77,7 @@ internal SecurityProfile() { } - /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For more information on encryption at host requirements, please refer to https://learn.microsoft.com/azure/virtual-machines/disk-encryption#supported-vm-sizes. public bool EncryptionAtHost { get; set; } /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. public SecurityTypes SecurityType { get; set; } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs index 699dde2ed57c..bd2f2b9cd274 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs @@ -23,9 +23,12 @@ public SecurityTypes(string value) } private const string TrustedLaunchValue = "trustedLaunch"; + private const string ConfidentialVMValue = "confidentialVM"; /// Trusted launch protects against advanced and persistent attack techniques. public static SecurityTypes TrustedLaunch { get; } = new SecurityTypes(TrustedLaunchValue); + /// Azure confidential computing offers confidential VMs are for tenants with high security and confidentiality requirements. These VMs provide a strong, hardware-enforced boundary to help meet your security needs. You can use confidential VMs for migrations without making changes to your code, with the platform protecting your VM's state from being read or modified. + public static SecurityTypes ConfidentialVM { get; } = new SecurityTypes(ConfidentialVMValue); /// Determines if two values are the same. public static bool operator ==(SecurityTypes left, SecurityTypes right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs index ff0839122bf2..cb00df229578 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs @@ -55,7 +55,7 @@ public UpgradePolicy(UpgradeMode mode) /// Initializes a new instance of . /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. /// Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade. - /// The configuration parameters used while performing a rolling upgrade. This property is only supported on Pools with the virtualMachineConfiguration property. + /// The configuration parameters used while performing a rolling upgrade. /// Keeps track of any properties unknown to the library. internal UpgradePolicy(UpgradeMode mode, AutomaticOsUpgradePolicy automaticOsUpgradePolicy, RollingUpgradePolicy rollingUpgradePolicy, IDictionary serializedAdditionalRawData) { @@ -74,7 +74,7 @@ internal UpgradePolicy() public UpgradeMode Mode { get; set; } /// Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade. public AutomaticOsUpgradePolicy AutomaticOsUpgradePolicy { get; set; } - /// The configuration parameters used while performing a rolling upgrade. This property is only supported on Pools with the virtualMachineConfiguration property. + /// The configuration parameters used while performing a rolling upgrade. public RollingUpgradePolicy RollingUpgradePolicy { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VMDiskSecurityProfile.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VMDiskSecurityProfile.Serialization.cs new file mode 100644 index 000000000000..e9b0fb5d2ed0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VMDiskSecurityProfile.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class VMDiskSecurityProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMDiskSecurityProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SecurityEncryptionType)) + { + writer.WritePropertyName("securityEncryptionType"u8); + writer.WriteStringValue(SecurityEncryptionType.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VMDiskSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMDiskSecurityProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMDiskSecurityProfile(document.RootElement, options); + } + + internal static VMDiskSecurityProfile DeserializeVMDiskSecurityProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SecurityEncryptionTypes? securityEncryptionType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("securityEncryptionType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityEncryptionType = new SecurityEncryptionTypes(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMDiskSecurityProfile(securityEncryptionType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMDiskSecurityProfile)} does not support writing '{options.Format}' format."); + } + } + + VMDiskSecurityProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVMDiskSecurityProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMDiskSecurityProfile)} 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 VMDiskSecurityProfile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVMDiskSecurityProfile(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/batch/Azure.Compute.Batch/src/Generated/VMDiskSecurityProfile.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VMDiskSecurityProfile.cs new file mode 100644 index 000000000000..2405e8506ee0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VMDiskSecurityProfile.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs and required when using Confidential VMs. + public partial class VMDiskSecurityProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 VMDiskSecurityProfile() + { + } + + /// Initializes a new instance of . + /// Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob. **Note**: It can be set for only Confidential VMs and is required when using Confidential VMs. + /// Keeps track of any properties unknown to the library. + internal VMDiskSecurityProfile(SecurityEncryptionTypes? securityEncryptionType, IDictionary serializedAdditionalRawData) + { + SecurityEncryptionType = securityEncryptionType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob. **Note**: It can be set for only Confidential VMs and is required when using Confidential VMs. + public SecurityEncryptionTypes? SecurityEncryptionType { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs index 8923d6045e32..ea1946689c31 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs @@ -67,7 +67,7 @@ public VirtualMachineConfiguration(ImageReference imageReference, string nodeAge /// A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. /// The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation. /// Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. - /// The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. + /// The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. /// /// This only applies to Images that contain the Windows operating system, and /// should only be used when you hold valid on-premises licenses for the Compute @@ -115,7 +115,7 @@ internal VirtualMachineConfiguration() public string NodeAgentSkuId { get; set; } /// Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. public WindowsConfiguration WindowsConfiguration { get; set; } - /// The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. + /// The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. public IList DataDisks { get; } /// /// This only applies to Images that contain the Windows operating system, and diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs index 1f3173fcb231..c096f45f3294 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs @@ -51,7 +51,7 @@ public WindowsUserConfiguration() } /// Initializes a new instance of . - /// The login mode for the user. The default value for VirtualMachineConfiguration Pools is 'batch'. + /// The login mode for the user. The default is 'batch'. /// Keeps track of any properties unknown to the library. internal WindowsUserConfiguration(LoginMode? loginMode, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal WindowsUserConfiguration(LoginMode? loginMode, IDictionary The login mode for the user. The default value for VirtualMachineConfiguration Pools is 'batch'. + /// The login mode for the user. The default is 'batch'. public LoginMode? LoginMode { get; set; } } } diff --git a/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs b/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs index 274be47c20ed..ce0bb02a54a9 100644 --- a/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs +++ b/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs @@ -20,7 +20,7 @@ public partial class Samples_BatchClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplication_GetApplications() + public void Example_BatchClient_GetApplication_GetApplications() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -36,7 +36,7 @@ public void Example_Batch_GetApplication_GetApplications() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplication_GetApplications_Async() + public async Task Example_BatchClient_GetApplication_GetApplications_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -52,7 +52,7 @@ public async Task Example_Batch_GetApplication_GetApplications_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplication_GetApplications_Convenience() + public void Example_BatchClient_GetApplication_GetApplications_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -63,7 +63,7 @@ public void Example_Batch_GetApplication_GetApplications_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplication_GetApplications_Convenience_Async() + public async Task Example_BatchClient_GetApplication_GetApplications_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -74,7 +74,7 @@ public async Task Example_Batch_GetApplication_GetApplications_Convenience_Async [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking() + public void Example_BatchClient_CreatePool_CreatesAPoolWithAcceleratedNetworking() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -108,7 +108,7 @@ public void Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Async() + public async Task Example_BatchClient_CreatePool_CreatesAPoolWithAcceleratedNetworking_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -142,7 +142,7 @@ public async Task Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Convenience() + public void Example_BatchClient_CreatePool_CreatesAPoolWithAcceleratedNetworking_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -168,7 +168,7 @@ public void Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Conve [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAPoolWithAcceleratedNetworking_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -194,7 +194,7 @@ public async Task Example_Batch_CreatePool_CreatesAPoolWithAcceleratedNetworking [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified() + public void Example_BatchClient_CreatePool_CreatesAPoolWithMountDriveSpecified() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -275,7 +275,7 @@ public void Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Async() + public async Task Example_BatchClient_CreatePool_CreatesAPoolWithMountDriveSpecified_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -356,7 +356,7 @@ public async Task Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_A [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Convenience() + public void Example_BatchClient_CreatePool_CreatesAPoolWithMountDriveSpecified_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -407,7 +407,7 @@ public void Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Conveni [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAPoolWithMountDriveSpecified_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -458,7 +458,7 @@ public async Task Example_Batch_CreatePool_CreatesAPoolWithMountDriveSpecified_C [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -504,7 +504,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -550,7 +550,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Convenience() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -573,7 +573,10 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith }, Caching = CachingType.ReadWrite, DiskSizeGB = 100, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), + ManagedDisk = new ManagedDisk + { + StorageAccountType = StorageAccountType.StandardSSDLRS, + }, }, }, ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -587,7 +590,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithOSDisk_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -610,7 +613,10 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo }, Caching = CachingType.ReadWrite, DiskSizeGB = 100, - ManagedDisk = new ManagedDisk(StorageAccountType.StandardSSDLRS), + ManagedDisk = new ManagedDisk + { + StorageAccountType = StorageAccountType.StandardSSDLRS, + }, }, }, ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -624,7 +630,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags() + public void Example_BatchClient_CreatePool_CreatesASimplePoolWithResourceTags() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -659,7 +665,7 @@ public void Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Async() + public async Task Example_BatchClient_CreatePool_CreatesASimplePoolWithResourceTags_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -694,7 +700,7 @@ public async Task Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_As [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Convenience() + public void Example_BatchClient_CreatePool_CreatesASimplePoolWithResourceTags_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -721,7 +727,7 @@ public void Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Convenie [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesASimplePoolWithResourceTags_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -748,7 +754,7 @@ public async Task Example_Batch_CreatePool_CreatesASimplePoolWithResourceTags_Co [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile() + public void Example_BatchClient_CreatePool_CreatesAPoolWithSecurityProfile() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -787,7 +793,7 @@ public void Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Async() + public async Task Example_BatchClient_CreatePool_CreatesAPoolWithSecurityProfile_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -826,7 +832,7 @@ public async Task Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Async [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Convenience() + public void Example_BatchClient_CreatePool_CreatesAPoolWithSecurityProfile_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -854,7 +860,7 @@ public void Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Convenience [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAPoolWithSecurityProfile_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -882,7 +888,7 @@ public async Task Example_Batch_CreatePool_CreatesAPoolWithSecurityProfile_Conve [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPool() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -928,7 +934,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPool_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -974,7 +980,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Convenience() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPool_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1002,7 +1008,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Con [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPool_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPool_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1030,7 +1036,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1075,7 +1081,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1120,7 +1126,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Convenience() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1152,7 +1158,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithContainers_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1184,7 +1190,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1248,7 +1254,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1312,7 +1318,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Convenience() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1354,7 +1360,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithExtensions_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1396,7 +1402,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1434,7 +1440,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1472,7 +1478,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience() + public void Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1501,7 +1507,7 @@ public void Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWith [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience_Async() + public async Task Example_BatchClient_CreatePool_CreatesAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1530,7 +1536,7 @@ public async Task Example_Batch_CreatePool_CreatesAVirtualMachineConfigurationPo [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeletePool_PoolDelete() + public void Example_BatchClient_DeletePool_PoolDelete() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1543,7 +1549,7 @@ public void Example_Batch_DeletePool_PoolDelete() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeletePool_PoolDelete_Async() + public async Task Example_BatchClient_DeletePool_PoolDelete_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1556,7 +1562,7 @@ public async Task Example_Batch_DeletePool_PoolDelete_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking() + public void Example_BatchClient_GetPool_GetAPoolWithAcceleratedNetworking() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1570,7 +1576,7 @@ public void Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Async() + public async Task Example_BatchClient_GetPool_GetAPoolWithAcceleratedNetworking_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1584,7 +1590,7 @@ public async Task Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Convenience() + public void Example_BatchClient_GetPool_GetAPoolWithAcceleratedNetworking_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1595,7 +1601,7 @@ public void Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Convenience( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Convenience_Async() + public async Task Example_BatchClient_GetPool_GetAPoolWithAcceleratedNetworking_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1606,7 +1612,7 @@ public async Task Example_Batch_GetPool_GetAPoolWithAcceleratedNetworking_Conven [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_PoolGet() + public void Example_BatchClient_GetPool_PoolGet() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1620,7 +1626,7 @@ public void Example_Batch_GetPool_PoolGet() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_PoolGet_Async() + public async Task Example_BatchClient_GetPool_PoolGet_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1634,7 +1640,7 @@ public async Task Example_Batch_GetPool_PoolGet_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_PoolGet_Convenience() + public void Example_BatchClient_GetPool_PoolGet_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1645,7 +1651,7 @@ public void Example_Batch_GetPool_PoolGet_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_PoolGet_Convenience_Async() + public async Task Example_BatchClient_GetPool_PoolGet_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1656,7 +1662,7 @@ public async Task Example_Batch_GetPool_PoolGet_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile() + public void Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1670,7 +1676,7 @@ public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurit [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Async() + public async Task Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1684,7 +1690,7 @@ public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Convenience() + public void Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1695,7 +1701,7 @@ public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurit [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Convenience_Async() + public async Task Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithSecurityProfile_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1706,7 +1712,7 @@ public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions() + public void Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1720,7 +1726,7 @@ public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Async() + public async Task Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1734,7 +1740,7 @@ public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithE [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Convenience() + public void Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1745,7 +1751,7 @@ public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Convenience_Async() + public async Task Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithExtensions_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1756,7 +1762,7 @@ public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithE [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk() + public void Example_BatchClient_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1770,7 +1776,7 @@ public void Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Async() + public async Task Example_BatchClient_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1784,7 +1790,7 @@ public async Task Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithO [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Convenience() + public void Example_BatchClient_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1795,7 +1801,7 @@ public void Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Convenience_Async() + public async Task Example_BatchClient_GetPool_AddAVirtualMachineConfigurationPoolWithOSDisk_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1806,7 +1812,7 @@ public async Task Example_Batch_GetPool_AddAVirtualMachineConfigurationPoolWithO [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference() + public void Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1820,7 +1826,7 @@ public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithService [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Async() + public async Task Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1834,7 +1840,7 @@ public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience() + public void Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1845,7 +1851,7 @@ public void Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithService [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience_Async() + public async Task Example_BatchClient_GetPool_GetAVirtualMachineConfigurationPoolWithServiceArtifactReference_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1856,7 +1862,7 @@ public async Task Example_Batch_GetPool_GetAVirtualMachineConfigurationPoolWithS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdatePool_PatchThePool() + public void Example_BatchClient_UpdatePool_PatchThePool() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1876,7 +1882,7 @@ public void Example_Batch_UpdatePool_PatchThePool() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdatePool_PatchThePool_Async() + public async Task Example_BatchClient_UpdatePool_PatchThePool_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1896,7 +1902,7 @@ public async Task Example_Batch_UpdatePool_PatchThePool_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisablePoolAutoScale_DisablePoolAutoscale() + public void Example_BatchClient_DisablePoolAutoScale_DisablePoolAutoscale() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1909,7 +1915,7 @@ public void Example_Batch_DisablePoolAutoScale_DisablePoolAutoscale() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisablePoolAutoScale_DisablePoolAutoscale_Async() + public async Task Example_BatchClient_DisablePoolAutoScale_DisablePoolAutoscale_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1922,7 +1928,7 @@ public async Task Example_Batch_DisablePoolAutoScale_DisablePoolAutoscale_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale() + public void Example_BatchClient_EnablePoolAutoScale_PoolEnableAutoscale() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1940,7 +1946,7 @@ public void Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Async() + public async Task Example_BatchClient_EnablePoolAutoScale_PoolEnableAutoscale_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1958,7 +1964,7 @@ public async Task Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Convenience() + public void Example_BatchClient_EnablePoolAutoScale_PoolEnableAutoscale_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1974,7 +1980,7 @@ public void Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Convenience_Async() + public async Task Example_BatchClient_EnablePoolAutoScale_PoolEnableAutoscale_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1990,7 +1996,7 @@ public async Task Example_Batch_EnablePoolAutoScale_PoolEnableAutoscale_Convenie [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale() + public void Example_BatchClient_EvaluatePoolAutoScale_PoolEvaluateAutoscale() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2008,7 +2014,7 @@ public void Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Async() + public async Task Example_BatchClient_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2026,7 +2032,7 @@ public async Task Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Asyn [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenience() + public void Example_BatchClient_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2038,7 +2044,7 @@ public void Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenience_Async() + public async Task Example_BatchClient_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2050,7 +2056,7 @@ public async Task Example_Batch_EvaluatePoolAutoScale_PoolEvaluateAutoscale_Conv [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ResizePool_PoolResize() + public void Example_BatchClient_ResizePool_PoolResize() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2068,7 +2074,7 @@ public void Example_Batch_ResizePool_PoolResize() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ResizePool_PoolResize_Async() + public async Task Example_BatchClient_ResizePool_PoolResize_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2086,7 +2092,7 @@ public async Task Example_Batch_ResizePool_PoolResize_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ResizePool_PoolResize_Convenience() + public void Example_BatchClient_ResizePool_PoolResize_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2102,7 +2108,7 @@ public void Example_Batch_ResizePool_PoolResize_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ResizePool_PoolResize_Convenience_Async() + public async Task Example_BatchClient_ResizePool_PoolResize_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2118,7 +2124,7 @@ public async Task Example_Batch_ResizePool_PoolResize_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_StopPoolResize_PoolStopResize() + public void Example_BatchClient_StopPoolResize_PoolStopResize() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2131,7 +2137,7 @@ public void Example_Batch_StopPoolResize_PoolStopResize() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_StopPoolResize_PoolStopResize_Async() + public async Task Example_BatchClient_StopPoolResize_PoolStopResize_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2144,7 +2150,7 @@ public async Task Example_Batch_StopPoolResize_PoolStopResize_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplacePoolProperties_PoolUpdate() + public void Example_BatchClient_ReplacePoolProperties_PoolUpdate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2166,7 +2172,7 @@ public void Example_Batch_ReplacePoolProperties_PoolUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplacePoolProperties_PoolUpdate_Async() + public async Task Example_BatchClient_ReplacePoolProperties_PoolUpdate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2188,7 +2194,7 @@ public async Task Example_Batch_ReplacePoolProperties_PoolUpdate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplacePoolProperties_PoolUpdate_Convenience() + public void Example_BatchClient_ReplacePoolProperties_PoolUpdate_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2203,7 +2209,7 @@ public void Example_Batch_ReplacePoolProperties_PoolUpdate_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplacePoolProperties_PoolUpdate_Convenience_Async() + public async Task Example_BatchClient_ReplacePoolProperties_PoolUpdate_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2218,7 +2224,7 @@ public async Task Example_Batch_ReplacePoolProperties_PoolUpdate_Convenience_Asy [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RemoveNodes_PoolRemoveNodes() + public void Example_BatchClient_RemoveNodes_PoolRemoveNodes() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2239,7 +2245,7 @@ public void Example_Batch_RemoveNodes_PoolRemoveNodes() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RemoveNodes_PoolRemoveNodes_Async() + public async Task Example_BatchClient_RemoveNodes_PoolRemoveNodes_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2260,7 +2266,7 @@ public async Task Example_Batch_RemoveNodes_PoolRemoveNodes_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RemoveNodes_PoolRemoveNodes_Convenience() + public void Example_BatchClient_RemoveNodes_PoolRemoveNodes_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2272,7 +2278,7 @@ public void Example_Batch_RemoveNodes_PoolRemoveNodes_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RemoveNodes_PoolRemoveNodes_Convenience_Async() + public async Task Example_BatchClient_RemoveNodes_PoolRemoveNodes_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2284,7 +2290,7 @@ public async Task Example_Batch_RemoveNodes_PoolRemoveNodes_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteJob_DeleteJob() + public void Example_BatchClient_DeleteJob_DeleteJob() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2297,7 +2303,7 @@ public void Example_Batch_DeleteJob_DeleteJob() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteJob_DeleteJob_Async() + public async Task Example_BatchClient_DeleteJob_DeleteJob_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2310,7 +2316,7 @@ public async Task Example_Batch_DeleteJob_DeleteJob_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJob_JobGet() + public void Example_BatchClient_GetJob_JobGet() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2324,7 +2330,7 @@ public void Example_Batch_GetJob_JobGet() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJob_JobGet_Async() + public async Task Example_BatchClient_GetJob_JobGet_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2338,7 +2344,7 @@ public async Task Example_Batch_GetJob_JobGet_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJob_JobGet_Convenience() + public void Example_BatchClient_GetJob_JobGet_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2349,7 +2355,7 @@ public void Example_Batch_GetJob_JobGet_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJob_JobGet_Convenience_Async() + public async Task Example_BatchClient_GetJob_JobGet_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2360,7 +2366,7 @@ public async Task Example_Batch_GetJob_JobGet_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdateJob_JobPatch() + public void Example_BatchClient_UpdateJob_JobUpdate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2386,7 +2392,7 @@ public void Example_Batch_UpdateJob_JobPatch() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdateJob_JobPatch_Async() + public async Task Example_BatchClient_UpdateJob_JobUpdate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2412,7 +2418,7 @@ public async Task Example_Batch_UpdateJob_JobPatch_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJob_JobUpdate() + public void Example_BatchClient_ReplaceJob_JobPatch() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2438,7 +2444,7 @@ public void Example_Batch_ReplaceJob_JobUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJob_JobUpdate_Async() + public async Task Example_BatchClient_ReplaceJob_JobPatch_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2464,7 +2470,7 @@ public async Task Example_Batch_ReplaceJob_JobUpdate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJob_JobUpdate_Convenience() + public void Example_BatchClient_ReplaceJob_JobPatch_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2487,7 +2493,7 @@ public void Example_Batch_ReplaceJob_JobUpdate_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJob_JobUpdate_Convenience_Async() + public async Task Example_BatchClient_ReplaceJob_JobPatch_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2510,7 +2516,7 @@ public async Task Example_Batch_ReplaceJob_JobUpdate_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJob_JobDisable() + public void Example_BatchClient_DisableJob_JobDisable() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2527,7 +2533,7 @@ public void Example_Batch_DisableJob_JobDisable() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJob_JobDisable_Async() + public async Task Example_BatchClient_DisableJob_JobDisable_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2544,7 +2550,7 @@ public async Task Example_Batch_DisableJob_JobDisable_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJob_JobDisable_Convenience() + public void Example_BatchClient_DisableJob_JobDisable_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2556,7 +2562,7 @@ public void Example_Batch_DisableJob_JobDisable_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJob_JobDisable_Convenience_Async() + public async Task Example_BatchClient_DisableJob_JobDisable_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2568,7 +2574,7 @@ public async Task Example_Batch_DisableJob_JobDisable_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableJob_JobEnable() + public void Example_BatchClient_EnableJob_JobEnable() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2581,7 +2587,7 @@ public void Example_Batch_EnableJob_JobEnable() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableJob_JobEnable_Async() + public async Task Example_BatchClient_EnableJob_JobEnable_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2594,7 +2600,7 @@ public async Task Example_Batch_EnableJob_JobEnable_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJob_JobTerminate() + public void Example_BatchClient_TerminateJob_JobTerminate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2608,7 +2614,7 @@ public void Example_Batch_TerminateJob_JobTerminate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJob_JobTerminate_Async() + public async Task Example_BatchClient_TerminateJob_JobTerminate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2622,7 +2628,7 @@ public async Task Example_Batch_TerminateJob_JobTerminate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJob_JobTerminate_Convenience() + public void Example_BatchClient_TerminateJob_JobTerminate_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2633,7 +2639,7 @@ public void Example_Batch_TerminateJob_JobTerminate_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJob_JobTerminate_Convenience_Async() + public async Task Example_BatchClient_TerminateJob_JobTerminate_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2644,7 +2650,7 @@ public async Task Example_Batch_TerminateJob_JobTerminate_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_CreatesABasicJob() + public void Example_BatchClient_CreateJob_CreatesABasicJob() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2666,7 +2672,7 @@ public void Example_Batch_CreateJob_CreatesABasicJob() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_CreatesABasicJob_Async() + public async Task Example_BatchClient_CreateJob_CreatesABasicJob_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2688,7 +2694,7 @@ public async Task Example_Batch_CreateJob_CreatesABasicJob_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_CreatesABasicJob_Convenience() + public void Example_BatchClient_CreateJob_CreatesABasicJob_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2706,7 +2712,7 @@ public void Example_Batch_CreateJob_CreatesABasicJob_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_CreatesABasicJob_Convenience_Async() + public async Task Example_BatchClient_CreateJob_CreatesABasicJob_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2724,7 +2730,7 @@ public async Task Example_Batch_CreateJob_CreatesABasicJob_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_CreatesAComplexJob() + public void Example_BatchClient_CreateJob_CreatesAComplexJob() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2790,7 +2796,7 @@ public void Example_Batch_CreateJob_CreatesAComplexJob() poolLifetimeOption = "job", pool = new { - vmSize = "Standard_D1_v2", + vmSize = "STANDARD_D2S_V3", virtualMachineConfiguration = new { imageReference = new @@ -2801,6 +2807,14 @@ public void Example_Batch_CreateJob_CreatesAComplexJob() version = "latest", }, nodeAgentSKUId = "batch.node.windows amd64", + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + nodePlacementConfiguration = new + { + policy = "zonal", + }, }, resizeTimeout = "PT15M", targetDedicatedNodes = 3, @@ -2870,7 +2884,7 @@ public void Example_Batch_CreateJob_CreatesAComplexJob() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_CreatesAComplexJob_Async() + public async Task Example_BatchClient_CreateJob_CreatesAComplexJob_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -2936,7 +2950,7 @@ public async Task Example_Batch_CreateJob_CreatesAComplexJob_Async() poolLifetimeOption = "job", pool = new { - vmSize = "Standard_D1_v2", + vmSize = "STANDARD_D2S_V3", virtualMachineConfiguration = new { imageReference = new @@ -2947,6 +2961,14 @@ public async Task Example_Batch_CreateJob_CreatesAComplexJob_Async() version = "latest", }, nodeAgentSKUId = "batch.node.windows amd64", + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + nodePlacementConfiguration = new + { + policy = "zonal", + }, }, resizeTimeout = "PT15M", targetDedicatedNodes = 3, @@ -3016,7 +3038,7 @@ public async Task Example_Batch_CreateJob_CreatesAComplexJob_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJob_CreatesAComplexJob_Convenience() + public void Example_BatchClient_CreateJob_CreatesAComplexJob_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3027,7 +3049,7 @@ public void Example_Batch_CreateJob_CreatesAComplexJob_Convenience() AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) { AutoPoolIdPrefix = "mypool", - Pool = new BatchPoolSpecification("Standard_D1_v2") + Pool = new BatchPoolSpecification("STANDARD_D2S_V3") { VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { @@ -3035,7 +3057,17 @@ public void Example_Batch_CreateJob_CreatesAComplexJob_Convenience() Offer = "WindowsServer", Sku = "2016-datacenter-smalldisk", Version = "latest", - }, "batch.node.windows amd64"), + }, "batch.node.windows amd64") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = false, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Zonal, + }, + }, TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -3117,7 +3149,7 @@ public void Example_Batch_CreateJob_CreatesAComplexJob_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJob_CreatesAComplexJob_Convenience_Async() + public async Task Example_BatchClient_CreateJob_CreatesAComplexJob_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3128,7 +3160,7 @@ public async Task Example_Batch_CreateJob_CreatesAComplexJob_Convenience_Async() AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) { AutoPoolIdPrefix = "mypool", - Pool = new BatchPoolSpecification("Standard_D1_v2") + Pool = new BatchPoolSpecification("STANDARD_D2S_V3") { VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { @@ -3136,7 +3168,17 @@ public async Task Example_Batch_CreateJob_CreatesAComplexJob_Convenience_Async() Offer = "WindowsServer", Sku = "2016-datacenter-smalldisk", Version = "latest", - }, "batch.node.windows amd64"), + }, "batch.node.windows amd64") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = false, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Zonal, + }, + }, TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -3218,7 +3260,7 @@ public async Task Example_Batch_CreateJob_CreatesAComplexJob_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobTaskCounts_JobGetTaskCounts() + public void Example_BatchClient_GetJobTaskCounts_JobGetTaskCounts() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3241,7 +3283,7 @@ public void Example_Batch_GetJobTaskCounts_JobGetTaskCounts() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Async() + public async Task Example_BatchClient_GetJobTaskCounts_JobGetTaskCounts_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3264,7 +3306,7 @@ public async Task Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Convenience() + public void Example_BatchClient_GetJobTaskCounts_JobGetTaskCounts_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3275,7 +3317,7 @@ public void Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Convenience_Async() + public async Task Example_BatchClient_GetJobTaskCounts_JobGetTaskCounts_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3286,7 +3328,7 @@ public async Task Example_Batch_GetJobTaskCounts_JobGetTaskCounts_Convenience_As [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteJobSchedule_JobScheduleDelete() + public void Example_BatchClient_DeleteJobSchedule_JobScheduleDelete() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3299,7 +3341,7 @@ public void Example_Batch_DeleteJobSchedule_JobScheduleDelete() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteJobSchedule_JobScheduleDelete_Async() + public async Task Example_BatchClient_DeleteJobSchedule_JobScheduleDelete_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3312,7 +3354,7 @@ public async Task Example_Batch_DeleteJobSchedule_JobScheduleDelete_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedule_JobScheduleGet() + public void Example_BatchClient_GetJobSchedule_JobScheduleGet() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3326,7 +3368,7 @@ public void Example_Batch_GetJobSchedule_JobScheduleGet() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedule_JobScheduleGet_Async() + public async Task Example_BatchClient_GetJobSchedule_JobScheduleGet_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3340,7 +3382,7 @@ public async Task Example_Batch_GetJobSchedule_JobScheduleGet_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedule_JobScheduleGet_Convenience() + public void Example_BatchClient_GetJobSchedule_JobScheduleGet_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3351,7 +3393,7 @@ public void Example_Batch_GetJobSchedule_JobScheduleGet_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedule_JobScheduleGet_Convenience_Async() + public async Task Example_BatchClient_GetJobSchedule_JobScheduleGet_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3362,7 +3404,7 @@ public async Task Example_Batch_GetJobSchedule_JobScheduleGet_Convenience_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UpdateJobSchedule_JobSchedulePatch() + public void Example_BatchClient_UpdateJobSchedule_JobScheduleUpdate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3396,7 +3438,7 @@ public void Example_Batch_UpdateJobSchedule_JobSchedulePatch() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UpdateJobSchedule_JobSchedulePatch_Async() + public async Task Example_BatchClient_UpdateJobSchedule_JobScheduleUpdate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3430,7 +3472,7 @@ public async Task Example_Batch_UpdateJobSchedule_JobSchedulePatch_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJobSchedule_JobScheduleUpdate() + public void Example_BatchClient_ReplaceJobSchedule_JobSchedulePatch() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3464,7 +3506,7 @@ public void Example_Batch_ReplaceJobSchedule_JobScheduleUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Async() + public async Task Example_BatchClient_ReplaceJobSchedule_JobSchedulePatch_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3498,7 +3540,7 @@ public async Task Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Convenience() + public void Example_BatchClient_ReplaceJobSchedule_JobSchedulePatch_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3528,7 +3570,7 @@ public void Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Convenience_Async() + public async Task Example_BatchClient_ReplaceJobSchedule_JobSchedulePatch_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3558,7 +3600,7 @@ public async Task Example_Batch_ReplaceJobSchedule_JobScheduleUpdate_Convenience [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableJobSchedule_JobScheduleDisable() + public void Example_BatchClient_DisableJobSchedule_JobScheduleDisable() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3571,7 +3613,7 @@ public void Example_Batch_DisableJobSchedule_JobScheduleDisable() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableJobSchedule_JobScheduleDisable_Async() + public async Task Example_BatchClient_DisableJobSchedule_JobScheduleDisable_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3584,7 +3626,7 @@ public async Task Example_Batch_DisableJobSchedule_JobScheduleDisable_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableJobSchedule_JobScheduleEnable() + public void Example_BatchClient_EnableJobSchedule_JobScheduleEnable() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3597,7 +3639,7 @@ public void Example_Batch_EnableJobSchedule_JobScheduleEnable() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableJobSchedule_JobScheduleEnable_Async() + public async Task Example_BatchClient_EnableJobSchedule_JobScheduleEnable_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3610,7 +3652,7 @@ public async Task Example_Batch_EnableJobSchedule_JobScheduleEnable_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateJobSchedule_JobScheduleTerminate() + public void Example_BatchClient_TerminateJobSchedule_JobScheduleTerminate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3623,7 +3665,7 @@ public void Example_Batch_TerminateJobSchedule_JobScheduleTerminate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateJobSchedule_JobScheduleTerminate_Async() + public async Task Example_BatchClient_TerminateJobSchedule_JobScheduleTerminate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3636,7 +3678,7 @@ public async Task Example_Batch_TerminateJobSchedule_JobScheduleTerminate_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule() + public void Example_BatchClient_CreateJobSchedule_CreatesABasicJobSchedule() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3664,7 +3706,7 @@ public void Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Async() + public async Task Example_BatchClient_CreateJobSchedule_CreatesABasicJobSchedule_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3692,7 +3734,7 @@ public async Task Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Async [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Convenience() + public void Example_BatchClient_CreateJobSchedule_CreatesABasicJobSchedule_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3710,7 +3752,7 @@ public void Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Convenience [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Convenience_Async() + public async Task Example_BatchClient_CreateJobSchedule_CreatesABasicJobSchedule_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3728,7 +3770,7 @@ public async Task Example_Batch_CreateJobSchedule_CreatesABasicJobSchedule_Conve [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd() + public void Example_BatchClient_CreateJobSchedule_CreatesAComplexJobScheduleAdd() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3803,7 +3845,7 @@ public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd() poolLifetimeOption = "jobschedule", pool = new { - vmSize = "Standard_D1_v2", + vmSize = "STANDARD_D2S_V3", virtualMachineConfiguration = new { imageReference = new @@ -3814,6 +3856,14 @@ public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd() version = "latest", }, nodeAgentSKUId = "batch.node.windows amd64", + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + nodePlacementConfiguration = new + { + policy = "zonal", + }, }, resizeTimeout = "PT15M", targetDedicatedNodes = 3, @@ -3884,7 +3934,7 @@ public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Async() + public async Task Example_BatchClient_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -3959,7 +4009,7 @@ public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_ poolLifetimeOption = "jobschedule", pool = new { - vmSize = "Standard_D1_v2", + vmSize = "STANDARD_D2S_V3", virtualMachineConfiguration = new { imageReference = new @@ -3970,6 +4020,14 @@ public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_ version = "latest", }, nodeAgentSKUId = "batch.node.windows amd64", + windowsConfiguration = new + { + enableAutomaticUpdates = false, + }, + nodePlacementConfiguration = new + { + policy = "zonal", + }, }, resizeTimeout = "PT15M", targetDedicatedNodes = 3, @@ -4040,7 +4098,7 @@ public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Convenience() + public void Example_BatchClient_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4057,7 +4115,7 @@ public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Conven AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) { AutoPoolIdPrefix = "mypool", - Pool = new BatchPoolSpecification("Standard_D1_v2") + Pool = new BatchPoolSpecification("STANDARD_D2S_V3") { VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { @@ -4065,7 +4123,17 @@ public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Conven Offer = "WindowsServer", Sku = "2016-datacenter-smalldisk", Version = "latest", - }, "batch.node.windows amd64"), + }, "batch.node.windows amd64") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = false, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Zonal, + }, + }, TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -4149,7 +4217,7 @@ public void Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Conven [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Convenience_Async() + public async Task Example_BatchClient_CreateJobSchedule_CreatesAComplexJobScheduleAdd_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4166,7 +4234,7 @@ public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_ AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) { AutoPoolIdPrefix = "mypool", - Pool = new BatchPoolSpecification("Standard_D1_v2") + Pool = new BatchPoolSpecification("STANDARD_D2S_V3") { VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference { @@ -4174,7 +4242,17 @@ public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_ Offer = "WindowsServer", Sku = "2016-datacenter-smalldisk", Version = "latest", - }, "batch.node.windows amd64"), + }, "batch.node.windows amd64") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = false, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Zonal, + }, + }, TaskSlotsPerNode = 2, TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"), @@ -4258,7 +4336,7 @@ public async Task Example_Batch_CreateJobSchedule_CreatesAComplexJobScheduleAdd_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesABasicTask() + public void Example_BatchClient_CreateTask_CreatesABasicTask() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4276,7 +4354,7 @@ public void Example_Batch_CreateTask_CreatesABasicTask() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesABasicTask_Async() + public async Task Example_BatchClient_CreateTask_CreatesABasicTask_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4294,7 +4372,7 @@ public async Task Example_Batch_CreateTask_CreatesABasicTask_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesABasicTask_Convenience() + public void Example_BatchClient_CreateTask_CreatesABasicTask_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4306,7 +4384,7 @@ public void Example_Batch_CreateTask_CreatesABasicTask_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesABasicTask_Convenience_Async() + public async Task Example_BatchClient_CreateTask_CreatesABasicTask_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4318,7 +4396,7 @@ public async Task Example_Batch_CreateTask_CreatesABasicTask_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesATaskWithContainerSettings() + public void Example_BatchClient_CreateTask_CreatesATaskWithContainerSettings() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4349,7 +4427,7 @@ public void Example_Batch_CreateTask_CreatesATaskWithContainerSettings() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Async() + public async Task Example_BatchClient_CreateTask_CreatesATaskWithContainerSettings_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4380,7 +4458,7 @@ public async Task Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Asy [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Convenience() + public void Example_BatchClient_CreateTask_CreatesATaskWithContainerSettings_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4406,7 +4484,7 @@ public void Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Convenien [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Convenience_Async() + public async Task Example_BatchClient_CreateTask_CreatesATaskWithContainerSettings_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4432,7 +4510,297 @@ public async Task Example_Batch_CreateTask_CreatesATaskWithContainerSettings_Con [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesATaskWithExitConditions() + public void Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDataIsolation() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { +new +{ +source = "Task", +isReadOnly = true, +} + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + }); + Response response = client.CreateTask("jobId", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDataIsolation_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { +new +{ +source = "Task", +isReadOnly = true, +} + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + }); + Response response = await client.CreateTaskAsync("jobId", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDataIsolation_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") + { + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry +{ +Source = ContainerHostDataPath.Task, +IsReadOnly = true, +}}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + }; + Response response = client.CreateTask("jobId", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDataIsolation_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") + { + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry +{ +Source = ContainerHostDataPath.Task, +IsReadOnly = true, +}}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + }; + Response response = await client.CreateTaskAsync("jobId", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDuplicateSource() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { +new +{ +source = "Task", +isReadOnly = true, +}, +new +{ +source = "Task", +isReadOnly = true, +} + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + }); + Response response = client.CreateTask("jobId", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDuplicateSource_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "taskId", + commandLine = "bash -c 'echo hello'", + containerSettings = new + { + imageName = "ubuntu", + containerHostBatchBindMounts = new object[] + { +new +{ +source = "Task", +isReadOnly = true, +}, +new +{ +source = "Task", +isReadOnly = true, +} + }, + }, + userIdentity = new + { + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + }); + Response response = await client.CreateTaskAsync("jobId", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDuplicateSource_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") + { + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry +{ +Source = ContainerHostDataPath.Task, +IsReadOnly = true, +}, new ContainerHostBatchBindMountEntry +{ +Source = ContainerHostDataPath.Task, +IsReadOnly = true, +}}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + }; + Response response = client.CreateTask("jobId", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_CreateTask_CreatesATaskWithContainerSettingsWithDuplicateSource_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("taskId", "bash -c 'echo hello'") + { + ContainerSettings = new BatchTaskContainerSettings("ubuntu") + { + ContainerHostBatchBindMounts = {new ContainerHostBatchBindMountEntry +{ +Source = ContainerHostDataPath.Task, +IsReadOnly = true, +}, new ContainerHostBatchBindMountEntry +{ +Source = ContainerHostDataPath.Task, +IsReadOnly = true, +}}, + }, + UserIdentity = new UserIdentity + { + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + }; + Response response = await client.CreateTaskAsync("jobId", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_CreateTask_CreatesATaskWithExitConditions() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4473,7 +4841,7 @@ public void Example_Batch_CreateTask_CreatesATaskWithExitConditions() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesATaskWithExitConditions_Async() + public async Task Example_BatchClient_CreateTask_CreatesATaskWithExitConditions_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4514,7 +4882,7 @@ public async Task Example_Batch_CreateTask_CreatesATaskWithExitConditions_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesATaskWithExitConditions_Convenience() + public void Example_BatchClient_CreateTask_CreatesATaskWithExitConditions_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4543,7 +4911,7 @@ public void Example_Batch_CreateTask_CreatesATaskWithExitConditions_Convenience( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesATaskWithExitConditions_Convenience_Async() + public async Task Example_BatchClient_CreateTask_CreatesATaskWithExitConditions_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4572,7 +4940,7 @@ public async Task Example_Batch_CreateTask_CreatesATaskWithExitConditions_Conven [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement() + public void Example_BatchClient_CreateTask_CreatesATaskWithExtraSlotRequirement() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4591,7 +4959,7 @@ public void Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Async() + public async Task Example_BatchClient_CreateTask_CreatesATaskWithExtraSlotRequirement_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4610,7 +4978,7 @@ public async Task Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Convenience() + public void Example_BatchClient_CreateTask_CreatesATaskWithExtraSlotRequirement_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4625,7 +4993,7 @@ public void Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Conven [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_Convenience_Async() + public async Task Example_BatchClient_CreateTask_CreatesATaskWithExtraSlotRequirement_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4640,7 +5008,7 @@ public async Task Example_Batch_CreateTask_CreatesATaskWithExtraSlotRequirement_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks() + public void Example_BatchClient_CreateTaskCollection_CreatesABasicCollectionOfTasks() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4670,7 +5038,7 @@ public void Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks_Async() + public async Task Example_BatchClient_CreateTaskCollection_CreatesABasicCollectionOfTasks_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4700,7 +5068,7 @@ public async Task Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTa [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks_Convenience() + public void Example_BatchClient_CreateTaskCollection_CreatesABasicCollectionOfTasks_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4716,7 +5084,7 @@ public void Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks_Co [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTasks_Convenience_Async() + public async Task Example_BatchClient_CreateTaskCollection_CreatesABasicCollectionOfTasks_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4732,7 +5100,7 @@ public async Task Example_Batch_CreateTaskCollection_CreatesABasicCollectionOfTa [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks() + public void Example_BatchClient_CreateTaskCollection_CreatesAComplexCollectionOfTasks() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4807,7 +5175,7 @@ public void Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Async() + public async Task Example_BatchClient_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4882,7 +5250,7 @@ public async Task Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOf [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Convenience() + public void Example_BatchClient_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4929,7 +5297,7 @@ public void Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Convenience_Async() + public async Task Example_BatchClient_CreateTaskCollection_CreatesAComplexCollectionOfTasks_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4976,7 +5344,7 @@ public async Task Example_Batch_CreateTaskCollection_CreatesAComplexCollectionOf [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteTask_TaskDelete() + public void Example_BatchClient_DeleteTask_TaskDelete() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -4989,7 +5357,7 @@ public void Example_Batch_DeleteTask_TaskDelete() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteTask_TaskDelete_Async() + public async Task Example_BatchClient_DeleteTask_TaskDelete_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5002,7 +5370,7 @@ public async Task Example_Batch_DeleteTask_TaskDelete_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTask_TaskGet() + public void Example_BatchClient_GetTask_TaskGet() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5016,7 +5384,7 @@ public void Example_Batch_GetTask_TaskGet() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTask_TaskGet_Async() + public async Task Example_BatchClient_GetTask_TaskGet_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5030,7 +5398,7 @@ public async Task Example_Batch_GetTask_TaskGet_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTask_TaskGet_Convenience() + public void Example_BatchClient_GetTask_TaskGet_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5041,7 +5409,7 @@ public void Example_Batch_GetTask_TaskGet_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTask_TaskGet_Convenience_Async() + public async Task Example_BatchClient_GetTask_TaskGet_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5052,7 +5420,7 @@ public async Task Example_Batch_GetTask_TaskGet_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceTask_TaskUpdate() + public void Example_BatchClient_ReplaceTask_TaskUpdate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5074,7 +5442,7 @@ public void Example_Batch_ReplaceTask_TaskUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceTask_TaskUpdate_Async() + public async Task Example_BatchClient_ReplaceTask_TaskUpdate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5096,7 +5464,7 @@ public async Task Example_Batch_ReplaceTask_TaskUpdate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceTask_TaskUpdate_Convenience() + public void Example_BatchClient_ReplaceTask_TaskUpdate_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5116,7 +5484,7 @@ public void Example_Batch_ReplaceTask_TaskUpdate_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceTask_TaskUpdate_Convenience_Async() + public async Task Example_BatchClient_ReplaceTask_TaskUpdate_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5136,7 +5504,7 @@ public async Task Example_Batch_ReplaceTask_TaskUpdate_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_TerminateTask_TaskTerminate() + public void Example_BatchClient_TerminateTask_TaskTerminate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5149,7 +5517,7 @@ public void Example_Batch_TerminateTask_TaskTerminate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_TerminateTask_TaskTerminate_Async() + public async Task Example_BatchClient_TerminateTask_TaskTerminate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5162,7 +5530,7 @@ public async Task Example_Batch_TerminateTask_TaskTerminate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReactivateTask_TaskReactivate() + public void Example_BatchClient_ReactivateTask_TaskReactivate() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5175,7 +5543,7 @@ public void Example_Batch_ReactivateTask_TaskReactivate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReactivateTask_TaskReactivate_Async() + public async Task Example_BatchClient_ReactivateTask_TaskReactivate_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5188,7 +5556,7 @@ public async Task Example_Batch_ReactivateTask_TaskReactivate_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteTaskFile_FileDeleteFromTask() + public void Example_BatchClient_DeleteTaskFile_FileDeleteFromTask() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5201,7 +5569,7 @@ public void Example_Batch_DeleteTaskFile_FileDeleteFromTask() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteTaskFile_FileDeleteFromTask_Async() + public async Task Example_BatchClient_DeleteTaskFile_FileDeleteFromTask_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5214,7 +5582,7 @@ public async Task Example_Batch_DeleteTaskFile_FileDeleteFromTask_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFile_GetFileFromTask() + public void Example_BatchClient_GetTaskFile_GetFileFromTask() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5228,7 +5596,7 @@ public void Example_Batch_GetTaskFile_GetFileFromTask() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFile_GetFileFromTask_Async() + public async Task Example_BatchClient_GetTaskFile_GetFileFromTask_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5242,7 +5610,7 @@ public async Task Example_Batch_GetTaskFile_GetFileFromTask_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFile_GetFileFromTask_Convenience() + public void Example_BatchClient_GetTaskFile_GetFileFromTask_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5253,7 +5621,7 @@ public void Example_Batch_GetTaskFile_GetFileFromTask_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFile_GetFileFromTask_Convenience_Async() + public async Task Example_BatchClient_GetTaskFile_GetFileFromTask_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5264,7 +5632,7 @@ public async Task Example_Batch_GetTaskFile_GetFileFromTask_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateNodeUser_NodeCreateUser() + public void Example_BatchClient_CreateNodeUser_NodeCreateUser() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5284,7 +5652,7 @@ public void Example_Batch_CreateNodeUser_NodeCreateUser() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateNodeUser_NodeCreateUser_Async() + public async Task Example_BatchClient_CreateNodeUser_NodeCreateUser_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5304,7 +5672,7 @@ public async Task Example_Batch_CreateNodeUser_NodeCreateUser_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_CreateNodeUser_NodeCreateUser_Convenience() + public void Example_BatchClient_CreateNodeUser_NodeCreateUser_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5321,7 +5689,7 @@ public void Example_Batch_CreateNodeUser_NodeCreateUser_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_CreateNodeUser_NodeCreateUser_Convenience_Async() + public async Task Example_BatchClient_CreateNodeUser_NodeCreateUser_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5338,7 +5706,7 @@ public async Task Example_Batch_CreateNodeUser_NodeCreateUser_Convenience_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteNodeUser_NodeDeleteUser() + public void Example_BatchClient_DeleteNodeUser_NodeDeleteUser() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5351,7 +5719,7 @@ public void Example_Batch_DeleteNodeUser_NodeDeleteUser() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteNodeUser_NodeDeleteUser_Async() + public async Task Example_BatchClient_DeleteNodeUser_NodeDeleteUser_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5364,7 +5732,7 @@ public async Task Example_Batch_DeleteNodeUser_NodeDeleteUser_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceNodeUser_NodeUpdateUser() + public void Example_BatchClient_ReplaceNodeUser_NodeUpdateUser() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5382,7 +5750,7 @@ public void Example_Batch_ReplaceNodeUser_NodeUpdateUser() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceNodeUser_NodeUpdateUser_Async() + public async Task Example_BatchClient_ReplaceNodeUser_NodeUpdateUser_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5400,7 +5768,7 @@ public async Task Example_Batch_ReplaceNodeUser_NodeUpdateUser_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_ReplaceNodeUser_NodeUpdateUser_Convenience() + public void Example_BatchClient_ReplaceNodeUser_NodeUpdateUser_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5416,7 +5784,7 @@ public void Example_Batch_ReplaceNodeUser_NodeUpdateUser_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_ReplaceNodeUser_NodeUpdateUser_Convenience_Async() + public async Task Example_BatchClient_ReplaceNodeUser_NodeUpdateUser_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5432,7 +5800,7 @@ public async Task Example_Batch_ReplaceNodeUser_NodeUpdateUser_Convenience_Async [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNode_NodeGet() + public void Example_BatchClient_GetNode_NodeGet() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5446,7 +5814,7 @@ public void Example_Batch_GetNode_NodeGet() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNode_NodeGet_Async() + public async Task Example_BatchClient_GetNode_NodeGet_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5460,7 +5828,7 @@ public async Task Example_Batch_GetNode_NodeGet_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNode_NodeGet_Convenience() + public void Example_BatchClient_GetNode_NodeGet_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5471,7 +5839,7 @@ public void Example_Batch_GetNode_NodeGet_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNode_NodeGet_Convenience_Async() + public async Task Example_BatchClient_GetNode_NodeGet_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5482,7 +5850,7 @@ public async Task Example_Batch_GetNode_NodeGet_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RebootNode_NodeReboot() + public void Example_BatchClient_RebootNode_NodeReboot() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5496,7 +5864,7 @@ public void Example_Batch_RebootNode_NodeReboot() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RebootNode_NodeReboot_Async() + public async Task Example_BatchClient_RebootNode_NodeReboot_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5510,7 +5878,7 @@ public async Task Example_Batch_RebootNode_NodeReboot_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_RebootNode_NodeReboot_Convenience() + public void Example_BatchClient_RebootNode_NodeReboot_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5521,7 +5889,7 @@ public void Example_Batch_RebootNode_NodeReboot_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_RebootNode_NodeReboot_Convenience_Async() + public async Task Example_BatchClient_RebootNode_NodeReboot_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5532,7 +5900,133 @@ public async Task Example_Batch_RebootNode_NodeReboot_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableNodeScheduling_NodeDisableScheduling() + public void Example_BatchClient_StartNode_NodeStart() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.StartNode("poolId", "tvm-1695681911_1-20161122t193202z"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_StartNode_NodeStart_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.StartNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_ReimageNode_NodeReimage() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = client.ReimageNode("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_ReimageNode_NodeReimage_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.ReimageNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_ReimageNode_NodeReimage_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.ReimageNode("poolId", "tvm-1695681911_1-20161122t193202z"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_ReimageNode_NodeReimage_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.ReimageNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_DeallocateNode_NodeDeallocate() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = client.DeallocateNode("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_DeallocateNode_NodeDeallocate_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.DeallocateNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_DeallocateNode_NodeDeallocate_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeallocateNode("poolId", "tvm-1695681911_1-20161122t193202z"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_BatchClient_DeallocateNode_NodeDeallocate_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeallocateNodeAsync("poolId", "tvm-1695681911_1-20161122t193202z"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_BatchClient_DisableNodeScheduling_NodeDisableScheduling() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5546,7 +6040,7 @@ public void Example_Batch_DisableNodeScheduling_NodeDisableScheduling() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Async() + public async Task Example_BatchClient_DisableNodeScheduling_NodeDisableScheduling_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5560,7 +6054,7 @@ public async Task Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Asyn [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Convenience() + public void Example_BatchClient_DisableNodeScheduling_NodeDisableScheduling_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5571,7 +6065,7 @@ public void Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Convenience_Async() + public async Task Example_BatchClient_DisableNodeScheduling_NodeDisableScheduling_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5582,7 +6076,7 @@ public async Task Example_Batch_DisableNodeScheduling_NodeDisableScheduling_Conv [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_EnableNodeScheduling_NodeEnableScheduling() + public void Example_BatchClient_EnableNodeScheduling_NodeEnableScheduling() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5595,7 +6089,7 @@ public void Example_Batch_EnableNodeScheduling_NodeEnableScheduling() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_EnableNodeScheduling_NodeEnableScheduling_Async() + public async Task Example_BatchClient_EnableNodeScheduling_NodeEnableScheduling_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5608,7 +6102,7 @@ public async Task Example_Batch_EnableNodeScheduling_NodeEnableScheduling_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings() + public void Example_BatchClient_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5623,7 +6117,7 @@ public void Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Async() + public async Task Example_BatchClient_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5638,7 +6132,7 @@ public async Task Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSet [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Convenience() + public void Example_BatchClient_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5649,7 +6143,7 @@ public void Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Convenience_Async() + public async Task Example_BatchClient_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSettings_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5660,7 +6154,7 @@ public async Task Example_Batch_GetNodeRemoteLoginSettings_NodeGetRemoteLoginSet [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UploadNodeLogs_UploadBatchServiceLogs() + public void Example_BatchClient_UploadNodeLogs_UploadBatchServiceLogs() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5680,7 +6174,7 @@ public void Example_Batch_UploadNodeLogs_UploadBatchServiceLogs() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Async() + public async Task Example_BatchClient_UploadNodeLogs_UploadBatchServiceLogs_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5700,7 +6194,7 @@ public async Task Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Convenience() + public void Example_BatchClient_UploadNodeLogs_UploadBatchServiceLogs_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5712,7 +6206,7 @@ public void Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Convenience_Async() + public async Task Example_BatchClient_UploadNodeLogs_UploadBatchServiceLogs_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5724,7 +6218,7 @@ public async Task Example_Batch_UploadNodeLogs_UploadBatchServiceLogs_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtension_GetBatchNodeExtension() + public void Example_BatchClient_GetNodeExtension_GetBatchNodeExtension() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5738,7 +6232,7 @@ public void Example_Batch_GetNodeExtension_GetBatchNodeExtension() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtension_GetBatchNodeExtension_Async() + public async Task Example_BatchClient_GetNodeExtension_GetBatchNodeExtension_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5752,7 +6246,7 @@ public async Task Example_Batch_GetNodeExtension_GetBatchNodeExtension_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtension_GetBatchNodeExtension_Convenience() + public void Example_BatchClient_GetNodeExtension_GetBatchNodeExtension_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5763,7 +6257,7 @@ public void Example_Batch_GetNodeExtension_GetBatchNodeExtension_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtension_GetBatchNodeExtension_Convenience_Async() + public async Task Example_BatchClient_GetNodeExtension_GetBatchNodeExtension_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5774,7 +6268,7 @@ public async Task Example_Batch_GetNodeExtension_GetBatchNodeExtension_Convenien [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_DeleteNodeFile_FileDeleteFromNode() + public void Example_BatchClient_DeleteNodeFile_FileDeleteFromNode() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5787,7 +6281,7 @@ public void Example_Batch_DeleteNodeFile_FileDeleteFromNode() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_DeleteNodeFile_FileDeleteFromNode_Async() + public async Task Example_BatchClient_DeleteNodeFile_FileDeleteFromNode_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5800,7 +6294,7 @@ public async Task Example_Batch_DeleteNodeFile_FileDeleteFromNode_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFile_GetFileFromComputeNode() + public void Example_BatchClient_GetNodeFile_GetFileFromComputeNode() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5814,7 +6308,7 @@ public void Example_Batch_GetNodeFile_GetFileFromComputeNode() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFile_GetFileFromComputeNode_Async() + public async Task Example_BatchClient_GetNodeFile_GetFileFromComputeNode_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5828,7 +6322,7 @@ public async Task Example_Batch_GetNodeFile_GetFileFromComputeNode_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFile_GetFileFromComputeNode_Convenience() + public void Example_BatchClient_GetNodeFile_GetFileFromComputeNode_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5839,7 +6333,7 @@ public void Example_Batch_GetNodeFile_GetFileFromComputeNode_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFile_GetFileFromComputeNode_Convenience_Async() + public async Task Example_BatchClient_GetNodeFile_GetFileFromComputeNode_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5850,7 +6344,7 @@ public async Task Example_Batch_GetNodeFile_GetFileFromComputeNode_Convenience_A [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplications_ListApplications() + public void Example_BatchClient_GetApplications_ListApplications() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5867,7 +6361,7 @@ public void Example_Batch_GetApplications_ListApplications() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplications_ListApplications_Async() + public async Task Example_BatchClient_GetApplications_ListApplications_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5884,7 +6378,7 @@ public async Task Example_Batch_GetApplications_ListApplications_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetApplications_ListApplications_Convenience() + public void Example_BatchClient_GetApplications_ListApplications_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5897,7 +6391,7 @@ public void Example_Batch_GetApplications_ListApplications_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetApplications_ListApplications_Convenience_Async() + public async Task Example_BatchClient_GetApplications_ListApplications_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5910,7 +6404,7 @@ public async Task Example_Batch_GetApplications_ListApplications_Convenience_Asy [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics() + public void Example_BatchClient_GetPoolUsageMetrics_PoolListUsageMetrics() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5929,7 +6423,7 @@ public void Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Async() + public async Task Example_BatchClient_GetPoolUsageMetrics_PoolListUsageMetrics_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5948,7 +6442,7 @@ public async Task Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience() + public void Example_BatchClient_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5961,7 +6455,7 @@ public void Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience_Async() + public async Task Example_BatchClient_GetPoolUsageMetrics_PoolListUsageMetrics_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5974,7 +6468,7 @@ public async Task Example_Batch_GetPoolUsageMetrics_PoolListUsageMetrics_Conveni [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPools_PoolList() + public void Example_BatchClient_GetPools_PoolList() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -5989,7 +6483,7 @@ public void Example_Batch_GetPools_PoolList() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPools_PoolList_Async() + public async Task Example_BatchClient_GetPools_PoolList_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6004,7 +6498,7 @@ public async Task Example_Batch_GetPools_PoolList_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPools_PoolList_Convenience() + public void Example_BatchClient_GetPools_PoolList_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6017,7 +6511,7 @@ public void Example_Batch_GetPools_PoolList_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPools_PoolList_Convenience_Async() + public async Task Example_BatchClient_GetPools_PoolList_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6030,7 +6524,7 @@ public async Task Example_Batch_GetPools_PoolList_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSupportedImages_AccountListNodeAgentSkus() + public void Example_BatchClient_GetSupportedImages_AccountListNodeAgentSkus() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6048,7 +6542,7 @@ public void Example_Batch_GetSupportedImages_AccountListNodeAgentSkus() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Async() + public async Task Example_BatchClient_GetSupportedImages_AccountListNodeAgentSkus_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6066,7 +6560,7 @@ public async Task Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Asyn [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Convenience() + public void Example_BatchClient_GetSupportedImages_AccountListNodeAgentSkus_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6079,7 +6573,7 @@ public void Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Convenience_Async() + public async Task Example_BatchClient_GetSupportedImages_AccountListNodeAgentSkus_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6092,7 +6586,7 @@ public async Task Example_Batch_GetSupportedImages_AccountListNodeAgentSkus_Conv [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolNodeCounts_NodeCountsPayload() + public void Example_BatchClient_GetPoolNodeCounts_NodeCountsPayload() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6107,7 +6601,7 @@ public void Example_Batch_GetPoolNodeCounts_NodeCountsPayload() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Async() + public async Task Example_BatchClient_GetPoolNodeCounts_NodeCountsPayload_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6122,7 +6616,7 @@ public async Task Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Convenience() + public void Example_BatchClient_GetPoolNodeCounts_NodeCountsPayload_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6135,7 +6629,7 @@ public void Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Convenience_Async() + public async Task Example_BatchClient_GetPoolNodeCounts_NodeCountsPayload_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6148,7 +6642,7 @@ public async Task Example_Batch_GetPoolNodeCounts_NodeCountsPayload_Convenience_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobs_JobList() + public void Example_BatchClient_GetJobs_JobList() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6163,7 +6657,7 @@ public void Example_Batch_GetJobs_JobList() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobs_JobList_Async() + public async Task Example_BatchClient_GetJobs_JobList_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6178,7 +6672,7 @@ public async Task Example_Batch_GetJobs_JobList_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobs_JobList_Convenience() + public void Example_BatchClient_GetJobs_JobList_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6191,7 +6685,7 @@ public void Example_Batch_GetJobs_JobList_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobs_JobList_Convenience_Async() + public async Task Example_BatchClient_GetJobs_JobList_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6204,7 +6698,7 @@ public async Task Example_Batch_GetJobs_JobList_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule() + public void Example_BatchClient_GetJobsFromSchedules_ListJobUnderJobSchedule() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6219,7 +6713,7 @@ public void Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Async() + public async Task Example_BatchClient_GetJobsFromSchedules_ListJobUnderJobSchedule_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6234,7 +6728,7 @@ public async Task Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Asy [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Convenience() + public void Example_BatchClient_GetJobsFromSchedules_ListJobUnderJobSchedule_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6247,7 +6741,7 @@ public void Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Convenien [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Convenience_Async() + public async Task Example_BatchClient_GetJobsFromSchedules_ListJobUnderJobSchedule_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6260,7 +6754,7 @@ public async Task Example_Batch_GetJobsFromSchedules_ListJobUnderJobSchedule_Con [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus() + public void Example_BatchClient_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6275,7 +6769,7 @@ public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPrepara [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Async() + public async Task Example_BatchClient_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6290,7 +6784,7 @@ public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListP [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Convenience() + public void Example_BatchClient_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6303,7 +6797,7 @@ public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPrepara [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Convenience_Async() + public async Task Example_BatchClient_GetJobPreparationAndReleaseTaskStatuses_JobListPreparationAndReleaseTaskStatus_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6316,7 +6810,7 @@ public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_JobListP [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedules_JobScheduleList() + public void Example_BatchClient_GetJobSchedules_JobScheduleList() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6331,7 +6825,7 @@ public void Example_Batch_GetJobSchedules_JobScheduleList() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedules_JobScheduleList_Async() + public async Task Example_BatchClient_GetJobSchedules_JobScheduleList_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6346,7 +6840,7 @@ public async Task Example_Batch_GetJobSchedules_JobScheduleList_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetJobSchedules_JobScheduleList_Convenience() + public void Example_BatchClient_GetJobSchedules_JobScheduleList_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6359,7 +6853,7 @@ public void Example_Batch_GetJobSchedules_JobScheduleList_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetJobSchedules_JobScheduleList_Convenience_Async() + public async Task Example_BatchClient_GetJobSchedules_JobScheduleList_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6372,7 +6866,7 @@ public async Task Example_Batch_GetJobSchedules_JobScheduleList_Convenience_Asyn [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTasks_TaskList() + public void Example_BatchClient_GetTasks_TaskList() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6387,7 +6881,7 @@ public void Example_Batch_GetTasks_TaskList() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTasks_TaskList_Async() + public async Task Example_BatchClient_GetTasks_TaskList_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6402,7 +6896,7 @@ public async Task Example_Batch_GetTasks_TaskList_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTasks_TaskList_Convenience() + public void Example_BatchClient_GetTasks_TaskList_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6415,7 +6909,7 @@ public void Example_Batch_GetTasks_TaskList_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTasks_TaskList_Convenience_Async() + public async Task Example_BatchClient_GetTasks_TaskList_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6428,7 +6922,7 @@ public async Task Example_Batch_GetTasks_TaskList_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSubTasks_TaskListSubtasks() + public void Example_BatchClient_GetSubTasks_TaskListSubtasks() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6443,7 +6937,7 @@ public void Example_Batch_GetSubTasks_TaskListSubtasks() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSubTasks_TaskListSubtasks_Async() + public async Task Example_BatchClient_GetSubTasks_TaskListSubtasks_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6458,7 +6952,7 @@ public async Task Example_Batch_GetSubTasks_TaskListSubtasks_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetSubTasks_TaskListSubtasks_Convenience() + public void Example_BatchClient_GetSubTasks_TaskListSubtasks_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6471,7 +6965,7 @@ public void Example_Batch_GetSubTasks_TaskListSubtasks_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetSubTasks_TaskListSubtasks_Convenience_Async() + public async Task Example_BatchClient_GetSubTasks_TaskListSubtasks_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6484,7 +6978,7 @@ public async Task Example_Batch_GetSubTasks_TaskListSubtasks_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFiles_FileListFromTask() + public void Example_BatchClient_GetTaskFiles_FileListFromTask() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6499,7 +6993,7 @@ public void Example_Batch_GetTaskFiles_FileListFromTask() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFiles_FileListFromTask_Async() + public async Task Example_BatchClient_GetTaskFiles_FileListFromTask_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6514,7 +7008,7 @@ public async Task Example_Batch_GetTaskFiles_FileListFromTask_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetTaskFiles_FileListFromTask_Convenience() + public void Example_BatchClient_GetTaskFiles_FileListFromTask_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6527,7 +7021,7 @@ public void Example_Batch_GetTaskFiles_FileListFromTask_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetTaskFiles_FileListFromTask_Convenience_Async() + public async Task Example_BatchClient_GetTaskFiles_FileListFromTask_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6540,7 +7034,7 @@ public async Task Example_Batch_GetTaskFiles_FileListFromTask_Convenience_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodes_NodeList() + public void Example_BatchClient_GetNodes_NodeList() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6555,7 +7049,7 @@ public void Example_Batch_GetNodes_NodeList() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodes_NodeList_Async() + public async Task Example_BatchClient_GetNodes_NodeList_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6570,7 +7064,7 @@ public async Task Example_Batch_GetNodes_NodeList_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodes_NodeList_Convenience() + public void Example_BatchClient_GetNodes_NodeList_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6583,7 +7077,7 @@ public void Example_Batch_GetNodes_NodeList_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodes_NodeList_Convenience_Async() + public async Task Example_BatchClient_GetNodes_NodeList_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6596,7 +7090,7 @@ public async Task Example_Batch_GetNodes_NodeList_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtensions_ListComputeNodeExtensions() + public void Example_BatchClient_GetNodeExtensions_ListComputeNodeExtensions() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6611,7 +7105,7 @@ public void Example_Batch_GetNodeExtensions_ListComputeNodeExtensions() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Async() + public async Task Example_BatchClient_GetNodeExtensions_ListComputeNodeExtensions_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6626,7 +7120,7 @@ public async Task Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Asyn [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Convenience() + public void Example_BatchClient_GetNodeExtensions_ListComputeNodeExtensions_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6639,7 +7133,7 @@ public void Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Convenience_Async() + public async Task Example_BatchClient_GetNodeExtensions_ListComputeNodeExtensions_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6652,7 +7146,7 @@ public async Task Example_Batch_GetNodeExtensions_ListComputeNodeExtensions_Conv [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFiles_FileListFromNode() + public void Example_BatchClient_GetNodeFiles_FileListFromNode() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6667,7 +7161,7 @@ public void Example_Batch_GetNodeFiles_FileListFromNode() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFiles_FileListFromNode_Async() + public async Task Example_BatchClient_GetNodeFiles_FileListFromNode_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6682,7 +7176,7 @@ public async Task Example_Batch_GetNodeFiles_FileListFromNode_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Batch_GetNodeFiles_FileListFromNode_Convenience() + public void Example_BatchClient_GetNodeFiles_FileListFromNode_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -6695,7 +7189,7 @@ public void Example_Batch_GetNodeFiles_FileListFromNode_Convenience() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Batch_GetNodeFiles_FileListFromNode_Convenience_Async() + public async Task Example_BatchClient_GetNodeFiles_FileListFromNode_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/batch/Azure.Compute.Batch/tsp-location.yaml b/sdk/batch/Azure.Compute.Batch/tsp-location.yaml index 399863ae4a83..d247bc636470 100644 --- a/sdk/batch/Azure.Compute.Batch/tsp-location.yaml +++ b/sdk/batch/Azure.Compute.Batch/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/batch/Azure.Batch -commit: 9df71d5a717e4ed5e6728e7e6ba2fead60f62243 +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/batch/ci.mgmt.yml b/sdk/batch/ci.mgmt.yml index fdb37873525c..57a9135b3c71 100644 --- a/sdk/batch/ci.mgmt.yml +++ b/sdk/batch/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/batch/ci.mgmt.yml - sdk/batch/Azure.ResourceManager.Batch/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/batch/ci.mgmt.yml + - sdk/batch/Azure.ResourceManager.Batch/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/billing/ci.mgmt.yml b/sdk/billing/ci.mgmt.yml index 67cf904850c6..0efcab4a9c90 100644 --- a/sdk/billing/ci.mgmt.yml +++ b/sdk/billing/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/billing/ci.mgmt.yml - sdk/billing/Azure.ResourceManager.Billing/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/billing/ci.mgmt.yml + - sdk/billing/Azure.ResourceManager.Billing/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/billingbenefits/ci.mgmt.yml b/sdk/billingbenefits/ci.mgmt.yml index 9900a842be4f..d2d1e939d8cd 100644 --- a/sdk/billingbenefits/ci.mgmt.yml +++ b/sdk/billingbenefits/ci.mgmt.yml @@ -2,6 +2,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/billingbenefits/ci.mgmt.yml - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/billingbenefits/ci.mgmt.yml + - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/blueprint/ci.mgmt.yml b/sdk/blueprint/ci.mgmt.yml index 65bd23b77f51..6524937da4ee 100644 --- a/sdk/blueprint/ci.mgmt.yml +++ b/sdk/blueprint/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/blueprint/ci.mgmt.yml - sdk/blueprint/Azure.ResourceManager.Blueprint/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/blueprint/ci.mgmt.yml + - sdk/blueprint/Azure.ResourceManager.Blueprint/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/botservice/ci.mgmt.yml b/sdk/botservice/ci.mgmt.yml index 8e5444ff3f9a..3e991a6ebab1 100644 --- a/sdk/botservice/ci.mgmt.yml +++ b/sdk/botservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/botservice/ci.mgmt.yml - sdk/botservice/Azure.ResourceManager.BotService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/botservice/ci.mgmt.yml + - sdk/botservice/Azure.ResourceManager.BotService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cdn/ci.mgmt.yml b/sdk/cdn/ci.mgmt.yml index ac2ea82249d1..f1932c6d31b9 100644 --- a/sdk/cdn/ci.mgmt.yml +++ b/sdk/cdn/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cdn/ci.mgmt.yml - sdk/cdn/Azure.ResourceManager.Cdn/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cdn/ci.mgmt.yml + - sdk/cdn/Azure.ResourceManager.Cdn/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/changeanalysis/ci.mgmt.yml b/sdk/changeanalysis/ci.mgmt.yml index 65c6e90d195a..aee7612c339f 100644 --- a/sdk/changeanalysis/ci.mgmt.yml +++ b/sdk/changeanalysis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/changeanalysis/ci.mgmt.yml - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/changeanalysis/ci.mgmt.yml + - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/chaos/ci.mgmt.yml b/sdk/chaos/ci.mgmt.yml index 585591bcb6bd..a74922d27932 100644 --- a/sdk/chaos/ci.mgmt.yml +++ b/sdk/chaos/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/chaos/ci.mgmt.yml - sdk/chaos/Azure.ResourceManager.Chaos/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/chaos/ci.mgmt.yml + - sdk/chaos/Azure.ResourceManager.Chaos/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs index 9b8fcdf03b96..81b4584b3626 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs @@ -12,7 +12,7 @@ namespace Azure.AI.Language.Conversations.Authoring { // Data plane generated client. - /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href="https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. public partial class AuthoringClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml index 66b85f8aaf90..6960826d1970 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/cognitiveservices/Language.AnalyzeConversations-authoring -commit: 1bbb8f628f6e3083b73a2190e15bb0f5911571a3 +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c repo: Azure/azure-rest-api-specs - +additionalDirectories: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs index 2a590fb10e78..dd9ea5f05f47 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.net8.0.cs @@ -30,13 +30,14 @@ public ConversationAnalysisClient(System.Uri endpoint, Azure.Core.TokenCredentia } public partial class ConversationsClientOptions : Azure.Core.ClientOptions { - public ConversationsClientOptions(Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion.V2024_05_15_Preview) { } + public ConversationsClientOptions(Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, V2024_05_01 = 3, - V2024_05_15_Preview = 4, + V2024_11_01 = 4, + V2024_11_15_Preview = 5, } } public static partial class ConversationsModelFactory @@ -89,7 +90,7 @@ public static partial class ConversationsModelFactory public static Azure.AI.Language.Conversations.Models.ListKey ListKey(string key = null) { throw null; } public static Azure.AI.Language.Conversations.Models.LuisResult LuisResult(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.AI.Language.Conversations.Models.LuisTargetIntentResult LuisTargetIntentResult(string apiVersion = null, double confidence = 0, Azure.AI.Language.Conversations.Models.LuisResult result = null) { throw null; } - public static Azure.AI.Language.Conversations.Models.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0) { throw null; } + public static Azure.AI.Language.Conversations.Models.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Conversations.Models.NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = 0, Azure.AI.Language.Conversations.Models.ConversationResult result = null) { throw null; } public static Azure.AI.Language.Conversations.Models.NumberResolution NumberResolution(Azure.AI.Language.Conversations.Models.NumberKind numberKind = default(Azure.AI.Language.Conversations.Models.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Conversations.Models.NumericRangeResolution NumericRangeResolution(Azure.AI.Language.Conversations.Models.RangeKind rangeKind = default(Azure.AI.Language.Conversations.Models.RangeKind), double minimum = 0, double maximum = 0) { throw null; } @@ -407,6 +408,16 @@ 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 abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BooleanResolution : Azure.AI.Language.Conversations.Models.ResolutionBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal BooleanResolution() { } @@ -418,6 +429,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CharacterMaskPolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Conversations.Models.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.CharacterMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.CharacterMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ConversationActionResult : Azure.AI.Language.Conversations.Models.AnalyzeConversationActionResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationActionResult() { } @@ -686,6 +708,7 @@ public ConversationPiiActionContent() { } public System.Collections.Generic.IList PiiCategories { get { throw null; } } public bool? RedactAudioTiming { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Models.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.TranscriptContentType? RedactionSource { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -851,6 +874,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ConversationSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConversationSummarizationActionContent(System.Collections.Generic.IEnumerable summaryAspects) { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } @@ -989,6 +1013,16 @@ 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 EntityMaskTypePolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskTypePolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.EntityMaskTypePolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.EntityMaskTypePolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntitySubtype : Azure.AI.Language.Conversations.Models.ConversationEntityExtraInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitySubtype() { } @@ -1363,6 +1397,9 @@ internal NamedEntity() { } public string Category { get { throw null; } } public double ConfidenceScore { get { throw null; } } public int Length { get { throw null; } } + public string Mask { get { throw null; } } + public int? MaskLength { get { throw null; } } + public int? MaskOffset { get { throw null; } } public int Offset { get { throw null; } } public string Subcategory { get { throw null; } } public string Text { get { throw null; } } @@ -1373,6 +1410,16 @@ 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 NoMaskPolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.NoMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.NoMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NoneLinkedTargetIntentResult : Azure.AI.Language.Conversations.Models.TargetIntentResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NoneLinkedTargetIntentResult() : base (default(double)) { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs index 2a590fb10e78..dd9ea5f05f47 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs @@ -30,13 +30,14 @@ public ConversationAnalysisClient(System.Uri endpoint, Azure.Core.TokenCredentia } public partial class ConversationsClientOptions : Azure.Core.ClientOptions { - public ConversationsClientOptions(Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion.V2024_05_15_Preview) { } + public ConversationsClientOptions(Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, V2024_05_01 = 3, - V2024_05_15_Preview = 4, + V2024_11_01 = 4, + V2024_11_15_Preview = 5, } } public static partial class ConversationsModelFactory @@ -89,7 +90,7 @@ public static partial class ConversationsModelFactory public static Azure.AI.Language.Conversations.Models.ListKey ListKey(string key = null) { throw null; } public static Azure.AI.Language.Conversations.Models.LuisResult LuisResult(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.AI.Language.Conversations.Models.LuisTargetIntentResult LuisTargetIntentResult(string apiVersion = null, double confidence = 0, Azure.AI.Language.Conversations.Models.LuisResult result = null) { throw null; } - public static Azure.AI.Language.Conversations.Models.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0) { throw null; } + public static Azure.AI.Language.Conversations.Models.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Conversations.Models.NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = 0, Azure.AI.Language.Conversations.Models.ConversationResult result = null) { throw null; } public static Azure.AI.Language.Conversations.Models.NumberResolution NumberResolution(Azure.AI.Language.Conversations.Models.NumberKind numberKind = default(Azure.AI.Language.Conversations.Models.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Conversations.Models.NumericRangeResolution NumericRangeResolution(Azure.AI.Language.Conversations.Models.RangeKind rangeKind = default(Azure.AI.Language.Conversations.Models.RangeKind), double minimum = 0, double maximum = 0) { throw null; } @@ -407,6 +408,16 @@ 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 abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BooleanResolution : Azure.AI.Language.Conversations.Models.ResolutionBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal BooleanResolution() { } @@ -418,6 +429,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CharacterMaskPolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Conversations.Models.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.CharacterMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.CharacterMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ConversationActionResult : Azure.AI.Language.Conversations.Models.AnalyzeConversationActionResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationActionResult() { } @@ -686,6 +708,7 @@ public ConversationPiiActionContent() { } public System.Collections.Generic.IList PiiCategories { get { throw null; } } public bool? RedactAudioTiming { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Models.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.TranscriptContentType? RedactionSource { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -851,6 +874,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ConversationSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConversationSummarizationActionContent(System.Collections.Generic.IEnumerable summaryAspects) { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } @@ -989,6 +1013,16 @@ 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 EntityMaskTypePolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskTypePolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.EntityMaskTypePolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.EntityMaskTypePolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntitySubtype : Azure.AI.Language.Conversations.Models.ConversationEntityExtraInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitySubtype() { } @@ -1363,6 +1397,9 @@ internal NamedEntity() { } public string Category { get { throw null; } } public double ConfidenceScore { get { throw null; } } public int Length { get { throw null; } } + public string Mask { get { throw null; } } + public int? MaskLength { get { throw null; } } + public int? MaskOffset { get { throw null; } } public int Offset { get { throw null; } } public string Subcategory { get { throw null; } } public string Text { get { throw null; } } @@ -1373,6 +1410,16 @@ 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 NoMaskPolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.NoMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Models.NoMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NoneLinkedTargetIntentResult : Azure.AI.Language.Conversations.Models.TargetIntentResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NoneLinkedTargetIntentResult() : base (default(double)) { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs index 87f2eba66e91..d44da9f8c426 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Conversations /// Client options for ConversationAnalysisClient. public partial class ConversationsClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_05_15_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; /// The version of the service to use. public enum ServiceVersion @@ -24,8 +24,10 @@ public enum ServiceVersion V2023_04_01 = 2, /// Service version "2024-05-01". V2024_05_01 = 3, - /// Service version "2024-05-15-preview". - V2024_05_15_Preview = 4, + /// Service version "2024-11-01". + V2024_11_01 = 4, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 5, } internal string Version { get; } @@ -38,7 +40,8 @@ public ConversationsClientOptions(ServiceVersion version = LatestVersion) ServiceVersion.V2022_05_01 => "2022-05-01", ServiceVersion.V2023_04_01 => "2023-04-01", ServiceVersion.V2024_05_01 => "2024-05-01", - ServiceVersion.V2024_05_15_Preview => "2024-05-15-preview", + ServiceVersion.V2024_11_01 => "2024-11-01", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs index ade8de3ca4ea..969afa1b41ec 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs @@ -352,7 +352,7 @@ public static ListKey ListKey(string key = null) /// Initializes a new instance of . /// The key of the regex pattern used in extracting the entity. - /// The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. + /// The .NET regex pattern used in extracting the entity. Please visit https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. /// A new instance for mocking. public static RegexKey RegexKey(string key = null, string regexPattern = null) { @@ -384,36 +384,6 @@ public static TargetIntentResult TargetIntentResult(string targetProjectKind = n return new UnknownTargetIntentResult(targetProjectKind == null ? default : new TargetProjectKind(targetProjectKind), apiVersion, confidence, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The API version used to call a target service. - /// The prediction score and it ranges from 0.0 to 1.0. - /// The actual response from a Conversation project. - /// A new instance for mocking. - public static NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) - { - return new NoneLinkedTargetIntentResult(TargetProjectKind.NonLinked, apiVersion, confidence, serializedAdditionalRawData: null, result); - } - - /// Initializes a new instance of . - /// The same query given in request. - /// The detected language from the query in BCP 47 language representation. - /// The predicted result for the query. - /// A new instance for mocking. - public static ConversationResult ConversationResult(string query = null, string detectedLanguage = null, ConversationPrediction prediction = null) - { - return new ConversationResult(query, detectedLanguage, prediction, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The API version used to call a target service. - /// The prediction score and it ranges from 0.0 to 1.0. - /// The actual response from a Conversation project. - /// A new instance for mocking. - public static ConversationTargetIntentResult ConversationTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) - { - return new ConversationTargetIntentResult(TargetProjectKind.Conversation, apiVersion, confidence, serializedAdditionalRawData: null, result); - } - /// Initializes a new instance of . /// The API version used to call a target service. /// The prediction score and it ranges from 0.0 to 1.0. @@ -513,6 +483,36 @@ public static AnswerSpan AnswerSpan(string text = null, double? confidenceScore return new AnswerSpan(text, confidenceScore, offset, length, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The API version used to call a target service. + /// The prediction score and it ranges from 0.0 to 1.0. + /// The actual response from a Conversation project. + /// A new instance for mocking. + public static NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) + { + return new NoneLinkedTargetIntentResult(TargetProjectKind.NonLinked, apiVersion, confidence, serializedAdditionalRawData: null, result); + } + + /// Initializes a new instance of . + /// The same query given in request. + /// The detected language from the query in BCP 47 language representation. + /// The predicted result for the query. + /// A new instance for mocking. + public static ConversationResult ConversationResult(string query = null, string detectedLanguage = null, ConversationPrediction prediction = null) + { + return new ConversationResult(query, detectedLanguage, prediction, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The API version used to call a target service. + /// The prediction score and it ranges from 0.0 to 1.0. + /// The actual response from a Conversation project. + /// A new instance for mocking. + public static ConversationTargetIntentResult ConversationTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) + { + return new ConversationTargetIntentResult(TargetProjectKind.Conversation, apiVersion, confidence, serializedAdditionalRawData: null, result); + } + /// Initializes a new instance of . /// One of a server-defined set of error codes. /// A human-readable representation of the error. @@ -618,35 +618,89 @@ public static AnalyzeConversationOperationResult AnalyzeConversationOperationRes return new UnknownAnalyzeConversationOperationResult(lastUpdateDateTime, status, name, kind == null ? default : new AnalyzeConversationOperationResultsKind(kind), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. /// task name. /// results. - /// A new instance for mocking. - public static ConversationPiiOperationResult ConversationPiiOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, ConversationPiiResults results = null) + /// A new instance for mocking. + public static SummarizationOperationResult SummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, SummaryResult results = null) { - return new ConversationPiiOperationResult( + return new SummarizationOperationResult( lastUpdateDateTime, status, name, - AnalyzeConversationOperationResultsKind.PiiOperationResults, + AnalyzeConversationOperationResultsKind.SummarizationOperationResults, serializedAdditionalRawData: null, results); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// array of conversations. /// Errors by document id. /// statistics. /// This field indicates which model is used for scoring. - /// array of conversations. - /// A new instance for mocking. - public static ConversationPiiResults ConversationPiiResults(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable conversations = null) + /// A new instance for mocking. + public static SummaryResult SummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null) { + conversations ??= new List(); errors ??= new List(); - conversations ??= new List(); - return new ConversationPiiResults(errors?.ToList(), statistics, modelVersion, conversations?.ToList(), serializedAdditionalRawData: null); + return new SummaryResult(conversations?.ToList(), errors?.ToList(), statistics, modelVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique, non-empty conversation identifier. + /// Warnings encountered in processing the document. + /// If showStats=true was specified in the request this field will contain information about the conversation payload. + /// array of summaries. + /// A new instance for mocking. + public static ConversationsSummaryResult ConversationsSummaryResult(string id = null, IEnumerable warnings = null, ConversationStatistics statistics = null, IEnumerable summaries = null) + { + warnings ??= new List(); + summaries ??= new List(); + + return new ConversationsSummaryResult(id, warnings?.ToList(), statistics, summaries?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Warning code. + /// Warning message. + /// A JSON pointer reference indicating the target object. + /// A new instance for mocking. + public static InputWarning InputWarning(string code = null, string message = null, string targetRef = null) + { + return new InputWarning(code, message, targetRef, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of text units for the request. + /// A new instance for mocking. + public static ConversationStatistics ConversationStatistics(int transactionsCount = default) + { + return new ConversationStatistics(transactionsCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// aspect. + /// text. + /// Context list of the summary. + /// A new instance for mocking. + public static SummaryResultItem SummaryResultItem(string aspect = null, string text = null, IEnumerable contexts = null) + { + contexts ??= new List(); + + return new SummaryResultItem(aspect, text, contexts?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. + /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. + /// Reference to the ID of ConversationItem. + /// A new instance for mocking. + public static ItemizedSummaryContext ItemizedSummaryContext(int offset = default, int length = default, string conversationItemId = null) + { + return new ItemizedSummaryContext(offset, length, conversationItemId, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -669,6 +723,75 @@ public static RequestStatistics RequestStatistics(int documentsCount = default, return new RequestStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transactionsCount, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Custom Summary Result. + /// A new instance for mocking. + public static CustomSummarizationOperationResult CustomSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, CustomSummaryResult results = null) + { + return new CustomSummarizationOperationResult( + lastUpdateDateTime, + status, + name, + AnalyzeConversationOperationResultsKind.CustomSummarizationOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// array of conversations. + /// Errors by document id. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// This field indicates the project name for the model. + /// This field indicates the deployment name for the model. + /// A new instance for mocking. + public static CustomSummaryResult CustomSummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null) + { + conversations ??= new List(); + errors ??= new List(); + + return new CustomSummaryResult( + conversations?.ToList(), + errors?.ToList(), + statistics, + projectName, + deploymentName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// results. + /// A new instance for mocking. + public static ConversationPiiOperationResult ConversationPiiOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, ConversationPiiResults results = null) + { + return new ConversationPiiOperationResult( + lastUpdateDateTime, + status, + name, + AnalyzeConversationOperationResultsKind.PiiOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// Errors by document id. + /// statistics. + /// This field indicates which model is used for scoring. + /// array of conversations. + /// A new instance for mocking. + public static ConversationPiiResults ConversationPiiResults(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable conversations = null) + { + errors ??= new List(); + conversations ??= new List(); + + return new ConversationPiiResults(errors?.ToList(), statistics, modelVersion, conversations?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Unique, non-empty conversation identifier. /// Warnings encountered in processing the document. @@ -683,24 +806,6 @@ public static ConversationalPiiResult ConversationalPiiResult(string id = null, return new ConversationalPiiResult(id, warnings?.ToList(), statistics, conversationItems?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Warning code. - /// Warning message. - /// A JSON pointer reference indicating the target object. - /// A new instance for mocking. - public static InputWarning InputWarning(string code = null, string message = null, string targetRef = null) - { - return new InputWarning(code, message, targetRef, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of text units for the request. - /// A new instance for mocking. - public static ConversationStatistics ConversationStatistics(int transactionsCount = default) - { - return new ConversationStatistics(transactionsCount, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Id of the result. /// Transcript content response that the service generates, with all necessary personally identifiable information redacted. @@ -749,8 +854,11 @@ public static AudioTiming AudioTiming(long? offset = null, long? duration = null /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. + /// Exact mask text to mask the PII entity. + /// Offset of the mask text. + /// Length of the mask text. /// A new instance for mocking. - public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default) + public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default, string mask = null, int? maskOffset = null, int? maskLength = null) { return new NamedEntity( text, @@ -759,111 +867,9 @@ public static NamedEntity NamedEntity(string text = null, string category = null offset, length, confidenceScore, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// results. - /// A new instance for mocking. - public static SummarizationOperationResult SummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, SummaryResult results = null) - { - return new SummarizationOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeConversationOperationResultsKind.SummarizationOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// array of conversations. - /// Errors by document id. - /// statistics. - /// This field indicates which model is used for scoring. - /// A new instance for mocking. - public static SummaryResult SummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null) - { - conversations ??= new List(); - errors ??= new List(); - - return new SummaryResult(conversations?.ToList(), errors?.ToList(), statistics, modelVersion, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty conversation identifier. - /// Warnings encountered in processing the document. - /// If showStats=true was specified in the request this field will contain information about the conversation payload. - /// array of summaries. - /// A new instance for mocking. - public static ConversationsSummaryResult ConversationsSummaryResult(string id = null, IEnumerable warnings = null, ConversationStatistics statistics = null, IEnumerable summaries = null) - { - warnings ??= new List(); - summaries ??= new List(); - - return new ConversationsSummaryResult(id, warnings?.ToList(), statistics, summaries?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// aspect. - /// text. - /// Context list of the summary. - /// A new instance for mocking. - public static SummaryResultItem SummaryResultItem(string aspect = null, string text = null, IEnumerable contexts = null) - { - contexts ??= new List(); - - return new SummaryResultItem(aspect, text, contexts?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. - /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. - /// Reference to the ID of ConversationItem. - /// A new instance for mocking. - public static ItemizedSummaryContext ItemizedSummaryContext(int offset = default, int length = default, string conversationItemId = null) - { - return new ItemizedSummaryContext(offset, length, conversationItemId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Custom Summary Result. - /// A new instance for mocking. - public static CustomSummarizationOperationResult CustomSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, CustomSummaryResult results = null) - { - return new CustomSummarizationOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeConversationOperationResultsKind.CustomSummarizationOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// array of conversations. - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// A new instance for mocking. - public static CustomSummaryResult CustomSummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null) - { - conversations ??= new List(); - errors ??= new List(); - - return new CustomSummaryResult( - conversations?.ToList(), - errors?.ToList(), - statistics, - projectName, - deploymentName, + mask, + maskOffset, + maskLength, serializedAdditionalRawData: null); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml index 9a307ff5dc86..572bedf8b8a2 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml @@ -369,6 +369,30 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086")); ]]> This sample shows how to call GetAnalyzeConversationJobStatusAsync. @@ -420,6 +444,30 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086")); ]]> This sample shows how to call GetAnalyzeConversationJobStatus. @@ -501,6 +549,60 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086"), null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -612,6 +714,60 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086"), null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -714,9 +870,13 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, - ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, Name = "Conversation PII", } @@ -780,7 +940,7 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new EntityMaskTypePolicyType(), }, Name = "Conversation PII", } @@ -841,9 +1001,9 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", - PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, + ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, }, Name = "Conversation PII", } @@ -865,57 +1025,55 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { new TranscriptConversationItem( "1", - "speaker 1", - "", - "", - "Let's get started.", - "") + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") { - ConversationItemLevelTiming = new ConversationItemLevelTiming + WordLevelTimings = {new WordLevelTiming { - Offset = 0L, - Duration = 20000000L, - }, - }, - new TranscriptConversationItem( - "2", - "speaker 2", - "", - "", - "OK. How many remaining bugs do we have now?", - "") - { - ConversationItemLevelTiming = new ConversationItemLevelTiming + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming { - Offset = 20000000L, - Duration = 50000000L, - }, - }, - new TranscriptConversationItem( - "3", - "speaker 3", - "", - "", - "Only 3.", - "") - { - ConversationItemLevelTiming = new ConversationItemLevelTiming + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming { - Offset = 50000000L, - Duration = 60000000L, - }, + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, } }) + { + Domain = ConversationDomain.Generic, + } }), new AnalyzeConversationOperationAction[] { - new SummarizationOperationAction + new PiiOperationAction { - ActionContent = new ConversationSummarizationActionContent(new SummaryAspect[]{SummaryAspect.ChapterTitle, SummaryAspect.Narrative}), - Name = "Conversation Summarization Task 1", + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionPolicy = new NoMaskPolicyType(), + }, + Name = "Conversation PII", } }) { - DisplayName = "Conversation Summarization Example", + DisplayName = "Redacting PII data from transcribed audio", }; Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); ]]> @@ -927,17 +1085,210 @@ ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, cre AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] { - new TextConversation("20220101meeting", "en", new TextConversationItem[] + new TranscriptConversation("1", "en", new TranscriptConversationItem[] { - new TextConversationItem("1", "user", "Hi!") - { - Role = ParticipantRole.Customer, - }, - new TextConversationItem("2", "agent", "Hello, how can I help you?") - { - Role = ParticipantRole.Agent, - }, - new TextConversationItem("3", "user", "I am having trouble issuing a return of a game on my xbox: call of duty") + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionCharacter = RedactionCharacter.Minus, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "speaker 1", + "", + "", + "Let's get started.", + "") + { + ConversationItemLevelTiming = new ConversationItemLevelTiming + { + Offset = 0L, + Duration = 20000000L, + }, + }, + new TranscriptConversationItem( + "2", + "speaker 2", + "", + "", + "OK. How many remaining bugs do we have now?", + "") + { + ConversationItemLevelTiming = new ConversationItemLevelTiming + { + Offset = 20000000L, + Duration = 50000000L, + }, + }, + new TranscriptConversationItem( + "3", + "speaker 3", + "", + "", + "Only 3.", + "") + { + ConversationItemLevelTiming = new ConversationItemLevelTiming + { + Offset = 50000000L, + Duration = 60000000L, + }, + } + }) +}), new AnalyzeConversationOperationAction[] +{ + new SummarizationOperationAction + { + ActionContent = new ConversationSummarizationActionContent(new SummaryAspect[]{SummaryAspect.ChapterTitle, SummaryAspect.Narrative}), + Name = "Conversation Summarization Task 1", + } +}) +{ + DisplayName = "Conversation Summarization Example", +}; +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TextConversation("20220101meeting", "en", new TextConversationItem[] + { + new TextConversationItem("1", "user", "Hi!") + { + Role = ParticipantRole.Customer, + }, + new TextConversationItem("2", "agent", "Hello, how can I help you?") + { + Role = ParticipantRole.Agent, + }, + new TextConversationItem("3", "user", "I am having trouble issuing a return of a game on my xbox: call of duty") { Role = ParticipantRole.Customer, } @@ -1081,9 +1432,204 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionPolicy = new EntityMaskTypePolicyType(), + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, - ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, + RedactionPolicy = new NoMaskPolicyType(), }, Name = "Conversation PII", } @@ -1403,6 +1949,179 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "entityMask", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { displayName = "Redacting PII data from transcribed audio", @@ -1469,7 +2188,93 @@ using RequestContent content = RequestContent.Create(new modelVersion = "latest", excludePiiCategories = new object[] { - "Person" + "Person" + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "noMask", }, redactionSource = "lexical", redactAudioTiming = true, @@ -1890,6 +2695,179 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "entityMask", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { displayName = "Redacting PII data from transcribed audio", @@ -1972,6 +2950,92 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "noMask", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { displayName = "Redacting PII data from transcribed audio", diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..a288f89dcb70 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Models +{ + [PersistableModelProxy(typeof(UnknownBaseRedactionPolicy))] + public partial class BaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static BaseRedactionPolicy DeserializeBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("policyKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "characterMask": return CharacterMaskPolicyType.DeserializeCharacterMaskPolicyType(element, options); + case "entityMask": return EntityMaskTypePolicyType.DeserializeEntityMaskTypePolicyType(element, options); + case "noMask": return NoMaskPolicyType.DeserializeNoMaskPolicyType(element, options); + } + } + return UnknownBaseRedactionPolicy.DeserializeUnknownBaseRedactionPolicy(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 BaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBaseRedactionPolicy(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/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.cs new file mode 100644 index 000000000000..2396509fe391 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.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.AI.Language.Conversations.Models +{ + /// + /// The abstract base class for RedactionPolicy. + /// 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 BaseRedactionPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected BaseRedactionPolicy() + { + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal BaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) + { + PolicyKind = policyKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity RedactionPolicy object kind. + internal RedactionPolicyKind PolicyKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.Serialization.cs new file mode 100644 index 000000000000..33b75230a156 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.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.AI.Language.Conversations.Models +{ + public partial class CharacterMaskPolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CharacterMaskPolicyType)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RedactionCharacter)) + { + writer.WritePropertyName("redactionCharacter"u8); + writer.WriteStringValue(RedactionCharacter.Value.ToString()); + } + } + + CharacterMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); + } + + internal static CharacterMaskPolicyType DeserializeCharacterMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionCharacter? redactionCharacter = default; + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redactionCharacter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionCharacter = new RedactionCharacter(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CharacterMaskPolicyType(policyKind, serializedAdditionalRawData, redactionCharacter); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support writing '{options.Format}' format."); + } + } + + CharacterMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} 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 new CharacterMaskPolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCharacterMaskPolicyType(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.cs new file mode 100644 index 000000000000..141dee29a3d2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Models +{ + /// Represents the policy of masking with a redaction character. + public partial class CharacterMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public CharacterMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.CharacterMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + internal CharacterMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData, RedactionCharacter? redactionCharacter) : base(policyKind, serializedAdditionalRawData) + { + RedactionCharacter = redactionCharacter; + } + + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + public RedactionCharacter? RedactionCharacter { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs index 5b5f0e66c881..88fa41fba49e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs @@ -79,6 +79,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(RedactionPolicy)) + { + writer.WritePropertyName("redactionPolicy"u8); + writer.WriteObjectValue(RedactionPolicy, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -123,6 +128,7 @@ internal static ConversationPiiActionContent DeserializeConversationPiiActionCon TranscriptContentType? redactionSource = default; RedactionCharacter? redactionCharacter = default; IList excludePiiCategories = default; + BaseRedactionPolicy redactionPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -196,6 +202,15 @@ internal static ConversationPiiActionContent DeserializeConversationPiiActionCon excludePiiCategories = array; continue; } + if (property.NameEquals("redactionPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionPolicy = BaseRedactionPolicy.DeserializeBaseRedactionPolicy(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -210,6 +225,7 @@ internal static ConversationPiiActionContent DeserializeConversationPiiActionCon redactionSource, redactionCharacter, excludePiiCategories ?? new ChangeTrackingList(), + redactionPolicy, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs index fc962a138448..d1e3038d7711 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs @@ -60,8 +60,13 @@ public ConversationPiiActionContent() /// For transcript conversations, this parameter provides information regarding which content type (ITN, Text, Lexical, Masked ITN) should be used for entity detection. The details of the entities detected - like the offset, length and the text itself - will correspond to the text type selected here. /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. /// List of categories that need to be excluded instead of included. + /// + /// Optional parameter determine what type of redaction to use. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// /// Keeps track of any properties unknown to the library. - internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, IList piiCategories, bool? redactAudioTiming, TranscriptContentType? redactionSource, RedactionCharacter? redactionCharacter, IList excludePiiCategories, IDictionary serializedAdditionalRawData) + internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, IList piiCategories, bool? redactAudioTiming, TranscriptContentType? redactionSource, RedactionCharacter? redactionCharacter, IList excludePiiCategories, BaseRedactionPolicy redactionPolicy, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; @@ -70,6 +75,7 @@ internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, RedactionSource = redactionSource; RedactionCharacter = redactionCharacter; ExcludePiiCategories = excludePiiCategories; + RedactionPolicy = redactionPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,5 +93,11 @@ internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, public RedactionCharacter? RedactionCharacter { get; set; } /// List of categories that need to be excluded instead of included. public IList ExcludePiiCategories { get; } + /// + /// Optional parameter determine what type of redaction to use. + /// 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 BaseRedactionPolicy RedactionPolicy { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs index 3f164373f622..5fe1c4007498 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs @@ -66,6 +66,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); + if (Optional.IsDefined(Instruction)) + { + writer.WritePropertyName("instruction"u8); + writer.WriteStringValue(Instruction); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -109,6 +114,7 @@ internal static ConversationSummarizationActionContent DeserializeConversationSu StringIndexType? stringIndexType = default; SummaryLengthBucket? summaryLength = default; IList summaryAspects = default; + string instruction = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -164,6 +170,11 @@ internal static ConversationSummarizationActionContent DeserializeConversationSu summaryAspects = array; continue; } + if (property.NameEquals("instruction"u8)) + { + instruction = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -177,6 +188,7 @@ internal static ConversationSummarizationActionContent DeserializeConversationSu stringIndexType, summaryLength, summaryAspects, + instruction, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs index 30e6964d7584..178dadaf413f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs @@ -63,8 +63,9 @@ public ConversationSummarizationActionContent(IEnumerable summary /// String index type. /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. /// Array of Summary Aspects. + /// a text field to allow customers to use natural language to describe their needs for summarization. /// Keeps track of any properties unknown to the library. - internal ConversationSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, IList summaryAspects, IDictionary serializedAdditionalRawData) + internal ConversationSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, IList summaryAspects, string instruction, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; @@ -72,6 +73,7 @@ internal ConversationSummarizationActionContent(bool? loggingOptOut, string mode StringIndexType = stringIndexType; SummaryLength = summaryLength; SummaryAspects = summaryAspects; + Instruction = instruction; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,5 +94,7 @@ internal ConversationSummarizationActionContent() public SummaryLengthBucket? SummaryLength { get; set; } /// Array of Summary Aspects. public IList SummaryAspects { get; } + /// a text field to allow customers to use natural language to describe their needs for summarization. + public string Instruction { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs similarity index 55% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs index cdc53f548a18..05ac369ffc42 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Conversations.Models { - public partial class PrebuiltComponent : IUtf8JsonSerializable, IJsonModel + public partial class EntityMaskTypePolicyType : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,33 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } } - PrebuiltComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntityMaskTypePolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePrebuiltComponent(document.RootElement, options); + return DeserializeEntityMaskTypePolicyType(document.RootElement, options); } - internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntityMaskTypePolicyType DeserializeEntityMaskTypePolicyType(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +57,14 @@ internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement eleme { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + RedactionPolicyKind policyKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -84,46 +73,46 @@ internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new PrebuiltComponent(entityComponentKind, serializedAdditionalRawData, value); + return new EntityMaskTypePolicyType(policyKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} does not support writing '{options.Format}' format."); } } - PrebuiltComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntityMaskTypePolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializePrebuiltComponent(document.RootElement, options); + return DeserializeEntityMaskTypePolicyType(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new PrebuiltComponent FromResponse(Response response) + internal static new EntityMaskTypePolicyType FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializePrebuiltComponent(document.RootElement); + return DeserializeEntityMaskTypePolicyType(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.cs new file mode 100644 index 000000000000..2345cff7d3f5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Models +{ + /// Represents the policy of masking PII with the entity type. + public partial class EntityMaskTypePolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public EntityMaskTypePolicyType() + { + PolicyKind = RedactionPolicyKind.EntityMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal EntityMaskTypePolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs index d5bb88576ca7..6f9b007511c6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs @@ -49,6 +49,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Length); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); + if (Optional.IsDefined(Mask)) + { + writer.WritePropertyName("mask"u8); + writer.WriteStringValue(Mask); + } + if (Optional.IsDefined(MaskOffset)) + { + writer.WritePropertyName("maskOffset"u8); + writer.WriteNumberValue(MaskOffset.Value); + } + if (Optional.IsDefined(MaskLength)) + { + writer.WritePropertyName("maskLength"u8); + writer.WriteNumberValue(MaskLength.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -92,6 +107,9 @@ internal static NamedEntity DeserializeNamedEntity(JsonElement element, ModelRea int offset = default; int length = default; double confidenceScore = default; + string mask = default; + int? maskOffset = default; + int? maskLength = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,6 +144,29 @@ internal static NamedEntity DeserializeNamedEntity(JsonElement element, ModelRea confidenceScore = property.Value.GetDouble(); continue; } + if (property.NameEquals("mask"u8)) + { + mask = property.Value.GetString(); + continue; + } + if (property.NameEquals("maskOffset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maskOffset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maskLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maskLength = property.Value.GetInt32(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -139,6 +180,9 @@ internal static NamedEntity DeserializeNamedEntity(JsonElement element, ModelRea offset, length, confidenceScore, + mask, + maskOffset, + maskLength, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs index f8079487a0a5..3e60776d7584 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs @@ -71,8 +71,11 @@ internal NamedEntity(string text, string category, int offset, int length, doubl /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. + /// Exact mask text to mask the PII entity. + /// Offset of the mask text. + /// Length of the mask text. /// Keeps track of any properties unknown to the library. - internal NamedEntity(string text, string category, string subcategory, int offset, int length, double confidenceScore, IDictionary serializedAdditionalRawData) + internal NamedEntity(string text, string category, string subcategory, int offset, int length, double confidenceScore, string mask, int? maskOffset, int? maskLength, IDictionary serializedAdditionalRawData) { Text = text; Category = category; @@ -80,6 +83,9 @@ internal NamedEntity(string text, string category, string subcategory, int offse Offset = offset; Length = length; ConfidenceScore = confidenceScore; + Mask = mask; + MaskOffset = maskOffset; + MaskLength = maskLength; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -100,5 +106,11 @@ internal NamedEntity() public int Length { get; } /// Confidence score between 0 and 1 of the extracted entity. public double ConfidenceScore { get; } + /// Exact mask text to mask the PII entity. + public string Mask { get; } + /// Offset of the mask text. + public int? MaskOffset { get; } + /// Length of the mask text. + public int? MaskLength { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.Serialization.cs new file mode 100644 index 000000000000..dfad59816695 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Models +{ + public partial class NoMaskPolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(NoMaskPolicyType)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + NoMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNoMaskPolicyType(document.RootElement, options); + } + + internal static NoMaskPolicyType DeserializeNoMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NoMaskPolicyType(policyKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support writing '{options.Format}' format."); + } + } + + NoMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNoMaskPolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NoMaskPolicyType)} 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 new NoMaskPolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNoMaskPolicyType(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.cs new file mode 100644 index 000000000000..2ccc30399781 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Models +{ + /// Represents the policy of not masking found PII. + public partial class NoMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public NoMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.NoMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal NoMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactionPolicyKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactionPolicyKind.cs new file mode 100644 index 000000000000..18f75a5d2d9a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactionPolicyKind.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.AI.Language.Conversations.Models +{ + /// Kinds of redaction policies supported. + internal readonly partial struct RedactionPolicyKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedactionPolicyKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoMaskValue = "noMask"; + private const string CharacterMaskValue = "characterMask"; + private const string EntityMaskValue = "entityMask"; + + /// Do not mask detected entities. + public static RedactionPolicyKind NoMask { get; } = new RedactionPolicyKind(NoMaskValue); + /// Mask detected entities with redaction character. + public static RedactionPolicyKind CharacterMask { get; } = new RedactionPolicyKind(CharacterMaskValue); + /// Mask detected entities with entity type. + public static RedactionPolicyKind EntityMask { get; } = new RedactionPolicyKind(EntityMaskValue); + /// Determines if two values are the same. + public static bool operator ==(RedactionPolicyKind left, RedactionPolicyKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedactionPolicyKind left, RedactionPolicyKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedactionPolicyKind(string value) => new RedactionPolicyKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedactionPolicyKind other && Equals(other); + /// + public bool Equals(RedactionPolicyKind 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/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.cs index d0c65e7179d8..0df90d9a22ac 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.cs @@ -23,7 +23,7 @@ internal RegexKey() /// The extra information object kind. /// Keeps track of any properties unknown to the library. /// The key of the regex pattern used in extracting the entity. - /// The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. + /// The .NET regex pattern used in extracting the entity. Please visit https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. internal RegexKey(ExtraInformationKind extraInformationKind, IDictionary serializedAdditionalRawData, string key, string regexPattern) : base(extraInformationKind, serializedAdditionalRawData) { Key = key; @@ -32,7 +32,7 @@ internal RegexKey(ExtraInformationKind extraInformationKind, IDictionary The key of the regex pattern used in extracting the entity. public string Key { get; } - /// The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. + /// The .NET regex pattern used in extracting the entity. Please visit https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. public string RegexPattern { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..a4d01a2e7014 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Models +{ + internal partial class UnknownBaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static UnknownBaseRedactionPolicy DeserializeUnknownBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBaseRedactionPolicy(policyKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 new UnknownBaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownBaseRedactionPolicy(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.cs new file mode 100644 index 000000000000..07561d15dc2c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Models +{ + /// Unknown version of BaseRedactionPolicy. + internal partial class UnknownBaseRedactionPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal UnknownBaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownBaseRedactionPolicy() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs index 1ba9ef786043..3f584ad613a7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs @@ -377,6 +377,134 @@ public async Task Example_Conversations_AnalyzeConversation_SuccessfulAnalyzeCon Response response = await client.AnalyzeConversationAsync(analyzeConversationInput); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIExclusionTaskStatusRequest() @@ -441,6 +569,70 @@ public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobS Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIRedactionCharTaskStatusRequest() @@ -763,7 +955,7 @@ public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit() + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -833,9 +1025,14 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC parameters = new { modelVersion = "latest", -excludePiiCategories = new object[] +piiCategories = new object[] { -"Person" +"All" +}, +redactionPolicy = new +{ +policyKind = "characterMask", +redactionCharacter = "-", }, redactionSource = "lexical", redactAudioTiming = true, @@ -848,7 +1045,7 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Async() + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -918,9 +1115,14 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe parameters = new { modelVersion = "latest", -excludePiiCategories = new object[] +piiCategories = new object[] { -"Person" +"All" +}, +redactionPolicy = new +{ +policyKind = "characterMask", +redactionCharacter = "-", }, redactionSource = "lexical", redactAudioTiming = true, @@ -933,7 +1135,7 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe [Test] [Ignore("Only validating compilation of examples")] - public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience() + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -984,9 +1186,13 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, -ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +RedactionPolicy = new CharacterMaskPolicyType +{ +RedactionCharacter = RedactionCharacter.Minus, +}, }, Name = "Conversation PII", } @@ -999,7 +1205,7 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience_Async() + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1050,9 +1256,939 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, -ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +RedactionPolicy = new CharacterMaskPolicyType +{ +RedactionCharacter = RedactionCharacter.Minus, +}, +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "entityMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "entityMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new EntityMaskTypePolicyType(), +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new EntityMaskTypePolicyType(), +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +excludePiiCategories = new object[] +{ +"Person" +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +excludePiiCategories = new object[] +{ +"Person" +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "noMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "noMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new NoMaskPolicyType(), +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new NoMaskPolicyType(), }, Name = "Conversation PII", } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml index 5d1e84c0222b..13fc22948707 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/cognitiveservices/Language.Conversations -commit: 36651c812f1816316250b4ee3c02433e6d60576f +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/Azure.AI.Language.Documents.sln b/sdk/cognitivelanguage/Azure.AI.Language.Documents/Azure.AI.Language.Documents.sln new file mode 100644 index 000000000000..a513ce035af2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/Azure.AI.Language.Documents.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.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Documents", "src\Azure.AI.Language.Documents.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Documents.Tests", "tests\Azure.AI.Language.Documents.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 + {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/cognitivelanguage/Azure.AI.Language.Documents/CHANGELOG.md b/sdk/cognitivelanguage/Azure.AI.Language.Documents/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/Directory.Build.props b/sdk/cognitivelanguage/Azure.AI.Language.Documents/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/README.md b/sdk/cognitivelanguage/Azure.AI.Language.Documents/README.md new file mode 100644 index 000000000000..9fbe135e3140 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/README.md @@ -0,0 +1,107 @@ +# Azure.AI.Language.Documents client library for .NET + +Azure.AI.Language.Documents 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/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents --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/cognitivelanguage/Azure.AI.Language.Documents/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/cognitivelanguage/Azure.AI.Language.Documents/README.png) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/api/Azure.AI.Language.Documents.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/api/Azure.AI.Language.Documents.net8.0.cs new file mode 100644 index 000000000000..466dcf7d0579 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/api/Azure.AI.Language.Documents.net8.0.cs @@ -0,0 +1,1204 @@ +namespace Azure.AI.Language.Documents +{ + public partial class AbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AbstractiveSummarizationActionContent() { } + public string Instruction { get { throw null; } set { } } + public bool? LoggingOptOut { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + public int? SentenceCount { get { throw null; } set { } } + public Azure.AI.Language.Documents.StringIndexType? StringIndexType { get { throw null; } set { } } + public Azure.AI.Language.Documents.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummarizationOperationAction : Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AbstractiveSummarizationOperationAction(Azure.AI.Language.Documents.AbstractiveSummarizationActionContent actionContent) { } + public Azure.AI.Language.Documents.AbstractiveSummarizationActionContent ActionContent { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummarizationOperationResult : Azure.AI.Language.Documents.AnalyzeDocumentsLROResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Documents.DocumentActionState)) { } + public Azure.AI.Language.Documents.AbstractiveSummarizationResult Results { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummarizationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummarizationResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Documents.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummary() { } + public System.Collections.Generic.IReadOnlyList Contexts { get { throw null; } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummaryDocumentResultWithDetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummaryDocumentResultWithDetectedLanguage() { } + public Azure.AI.Language.Documents.DetectedLanguage DetectedLanguage { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Language.Documents.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Summaries { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummaryDocumentResultWithDetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummaryDocumentResultWithDetectedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 AILanguageDocumentsModelFactory + { + public static Azure.AI.Language.Documents.AbstractiveSummarizationOperationAction AbstractiveSummarizationOperationAction(string name = null, Azure.AI.Language.Documents.AbstractiveSummarizationActionContent actionContent = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummarizationOperationResult AbstractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, Azure.AI.Language.Documents.AbstractiveSummarizationResult results = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummarizationResult AbstractiveSummarizationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Documents.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummary AbstractiveSummary(string text = null, System.Collections.Generic.IEnumerable contexts = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummaryDocumentResultWithDetectedLanguage AbstractiveSummaryDocumentResultWithDetectedLanguage(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Documents.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable summaries = null, Azure.AI.Language.Documents.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsDocumentError AnalyzeDocumentsDocumentError(string id = null, Azure.AI.Language.Documents.AnalyzeDocumentsError error = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsError AnalyzeDocumentsError(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode code = default(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Documents.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsJobState AnalyzeDocumentsJobState(string displayName = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?), System.Guid jobId = default(System.Guid), System.DateTimeOffset lastUpdatedAt = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), System.Collections.Generic.IEnumerable errors = null, string nextLink = null, Azure.AI.Language.Documents.DocumentActions tasks = null, Azure.AI.Language.Documents.RequestStatistics statistics = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsLROResult AnalyzeDocumentsLROResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, string kind = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput AnalyzeDocumentsOperationInput(string displayName = null, Azure.AI.Language.Documents.MultiLanguageDocumentInput documentsInput = null, System.Collections.Generic.IEnumerable actions = null, string defaultLanguage = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsResult AnalyzeDocumentsResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Documents.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Documents.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Documents.ScriptKind? script = default(Azure.AI.Language.Documents.ScriptKind?), Azure.AI.Language.Documents.ScriptCode? scriptCode = default(Azure.AI.Language.Documents.ScriptCode?)) { throw null; } + public static Azure.AI.Language.Documents.DocumentActions DocumentActions(int completed = 0, int failed = 0, int inProgress = 0, int total = 0, System.Collections.Generic.IEnumerable items = null) { throw null; } + public static Azure.AI.Language.Documents.DocumentAnalysisDocumentResult DocumentAnalysisDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Documents.DocumentStatistics statistics = null, Azure.AI.Language.Documents.DocumentLocation source = null, System.Collections.Generic.IEnumerable target = null) { throw null; } + public static Azure.AI.Language.Documents.DocumentError DocumentError(string id = null, Azure.AI.Language.Documents.AnalyzeDocumentsError error = null) { throw null; } + public static Azure.AI.Language.Documents.DocumentStatistics DocumentStatistics(int charactersCount = 0, int transactionsCount = 0) { throw null; } + public static Azure.AI.Language.Documents.DocumentWarning DocumentWarning(Azure.AI.Language.Documents.WarningCode code = default(Azure.AI.Language.Documents.WarningCode), string message = null, string targetRef = null) { throw null; } + public static Azure.AI.Language.Documents.ExtractiveSummarizationOperationResult ExtractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, Azure.AI.Language.Documents.AnalyzeDocumentsResult results = null) { throw null; } + public static Azure.AI.Language.Documents.InnerErrorModel InnerErrorModel(Azure.AI.Language.Documents.InnerErrorCode code = default(Azure.AI.Language.Documents.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Documents.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Documents.MultiLanguageInput MultiLanguageInput(string id = null, Azure.AI.Language.Documents.DocumentLocation source = null, Azure.AI.Language.Documents.DocumentLocation target = null, string language = null) { throw null; } + public static Azure.AI.Language.Documents.PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, Azure.AI.Language.Documents.AnalyzeDocumentsResult results = null) { throw null; } + public static Azure.AI.Language.Documents.RequestStatistics RequestStatistics(int documentsCount = 0, int validDocumentsCount = 0, int erroneousDocumentsCount = 0, long transactionsCount = (long)0) { throw null; } + public static Azure.AI.Language.Documents.SummaryContext SummaryContext(int offset = 0, int length = 0) { throw null; } + } + public partial class AnalyzeDocumentsClient + { + protected AnalyzeDocumentsClient() { } + public AnalyzeDocumentsClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AnalyzeDocumentsClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Documents.AnalyzeDocumentsClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AnalyzeDocumentsCancelOperation(Azure.WaitUntil waitUntil, System.Guid jobId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeDocumentsCancelOperationAsync(Azure.WaitUntil waitUntil, System.Guid jobId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation AnalyzeDocumentsSubmitOperation(Azure.WaitUntil waitUntil, Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput analyzeDocumentOperationInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AnalyzeDocumentsSubmitOperation(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeDocumentsSubmitOperationAsync(Azure.WaitUntil waitUntil, Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput analyzeDocumentOperationInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeDocumentsSubmitOperationAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAnalyzeDocumentsJobStatus(System.Guid jobId, bool? showStats, int? top, int? skip, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAnalyzeDocumentsJobStatus(System.Guid jobId, bool? showStats = default(bool?), int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAnalyzeDocumentsJobStatusAsync(System.Guid jobId, bool? showStats, int? top, int? skip, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAnalyzeDocumentsJobStatusAsync(System.Guid jobId, bool? showStats = default(bool?), int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AnalyzeDocumentsClientOptions : Azure.Core.ClientOptions + { + public AnalyzeDocumentsClientOptions(Azure.AI.Language.Documents.AnalyzeDocumentsClientOptions.ServiceVersion version = Azure.AI.Language.Documents.AnalyzeDocumentsClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2024_11_15_Preview = 1, + } + } + public partial class AnalyzeDocumentsDocumentError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsDocumentError() { } + public Azure.AI.Language.Documents.AnalyzeDocumentsError Error { get { throw null; } } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsDocumentError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsDocumentError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AnalyzeDocumentsError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsError() { } + public Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Documents.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AnalyzeDocumentsErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AnalyzeDocumentsErrorCode(string value) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode 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.AI.Language.Documents.AnalyzeDocumentsErrorCode left, Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode left, Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AnalyzeDocumentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsJobState() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + public System.Guid JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedAt { get { throw null; } } + public string NextLink { get { throw null; } } + public Azure.AI.Language.Documents.RequestStatistics Statistics { get { throw null; } } + public Azure.AI.Language.Documents.DocumentActionState Status { get { throw null; } } + public Azure.AI.Language.Documents.DocumentActions Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AnalyzeDocumentsLROResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AnalyzeDocumentsLROResult(System.DateTimeOffset lastUpdateDateTime, Azure.AI.Language.Documents.DocumentActionState status) { } + public System.DateTimeOffset LastUpdateDateTime { get { throw null; } } + public Azure.AI.Language.Documents.DocumentActionState Status { get { throw null; } } + public string TaskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsLROResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsLROResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AnalyzeDocumentsOperationAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AnalyzeDocumentsOperationAction() { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AnalyzeDocumentsOperationInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AnalyzeDocumentsOperationInput(Azure.AI.Language.Documents.MultiLanguageDocumentInput documentsInput, System.Collections.Generic.IEnumerable actions) { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public string DefaultLanguage { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.AI.Language.Documents.MultiLanguageDocumentInput DocumentsInput { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AnalyzeDocumentsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Documents.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureBlobDocumentLocation : Azure.AI.Language.Documents.DocumentLocation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureBlobDocumentLocation(string location) { } + public string Location { get { throw null; } set { } } + public string ManagedIdentityClientId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AzureBlobDocumentLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AzureBlobDocumentLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CharacterMaskPolicy : Azure.AI.Language.Documents.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicy() { } + public Azure.AI.Language.Documents.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.CharacterMaskPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.CharacterMaskPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DetectedLanguage() { } + public double ConfidenceScore { get { throw null; } } + public string Iso6391Name { get { throw null; } } + public string Name { get { throw null; } } + public Azure.AI.Language.Documents.ScriptKind? Script { get { throw null; } } + public Azure.AI.Language.Documents.ScriptCode? ScriptCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DetectedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentActions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentActions() { } + public int Completed { get { throw null; } } + public int Failed { get { throw null; } } + public int InProgress { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Items { get { throw null; } } + public int Total { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentActions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentActions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DocumentActionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentActionState(string value) { throw null; } + public static Azure.AI.Language.Documents.DocumentActionState Cancelled { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Cancelling { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Failed { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState NotStarted { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Running { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.DocumentActionState 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.AI.Language.Documents.DocumentActionState left, Azure.AI.Language.Documents.DocumentActionState right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.DocumentActionState (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.DocumentActionState left, Azure.AI.Language.Documents.DocumentActionState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DocumentAnalysisDocumentResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentAnalysisDocumentResult() { } + public string Id { get { throw null; } } + public Azure.AI.Language.Documents.DocumentLocation Source { get { throw null; } } + public Azure.AI.Language.Documents.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Target { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentAnalysisDocumentResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentAnalysisDocumentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentError() { } + public Azure.AI.Language.Documents.AnalyzeDocumentsError Error { get { throw null; } } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DocumentLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DocumentLocation() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentStatistics() { } + public int CharactersCount { get { throw null; } } + public int TransactionsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentWarning() { } + public Azure.AI.Language.Documents.WarningCode Code { get { throw null; } } + public string Message { get { throw null; } } + public string TargetRef { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityMaskPolicy : Azure.AI.Language.Documents.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskPolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.EntityMaskPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.EntityMaskPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExtractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExtractiveSummarizationActionContent() { } + public bool? LoggingOptOut { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + public string Query { get { throw null; } set { } } + public long? SentenceCount { get { throw null; } set { } } + public Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria? SortBy { get { throw null; } set { } } + public Azure.AI.Language.Documents.StringIndexType? StringIndexType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExtractiveSummarizationOperationAction : Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExtractiveSummarizationOperationAction() { } + public Azure.AI.Language.Documents.ExtractiveSummarizationActionContent ActionContent { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExtractiveSummarizationOperationResult : Azure.AI.Language.Documents.AnalyzeDocumentsLROResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExtractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Documents.DocumentActionState)) { } + public Azure.AI.Language.Documents.AnalyzeDocumentsResult Results { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ExtractiveSummarizationSortingCriteria : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExtractiveSummarizationSortingCriteria(string value) { throw null; } + public static Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria Offset { get { throw null; } } + public static Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria Rank { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria 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.AI.Language.Documents.ExtractiveSummarizationSortingCriteria left, Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria left, Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Documents.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.InnerErrorCode 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.AI.Language.Documents.InnerErrorCode left, Azure.AI.Language.Documents.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.InnerErrorCode left, Azure.AI.Language.Documents.InnerErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InnerErrorModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InnerErrorModel() { } + public Azure.AI.Language.Documents.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Documents.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.InnerErrorModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLanguageDocumentInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MultiLanguageDocumentInput() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageDocumentInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageDocumentInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLanguageInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MultiLanguageInput(string id, Azure.AI.Language.Documents.DocumentLocation source, Azure.AI.Language.Documents.DocumentLocation target) { } + public string Id { get { throw null; } } + public string Language { get { throw null; } set { } } + public Azure.AI.Language.Documents.DocumentLocation Source { get { throw null; } } + public Azure.AI.Language.Documents.DocumentLocation Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NoMaskPolicy : Azure.AI.Language.Documents.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.NoMaskPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.NoMaskPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PiiActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PiiActionContent() { } + public Azure.AI.Language.Documents.PiiDomain? Domain { get { throw null; } set { } } + public bool? ExcludeExtractionData { get { throw null; } set { } } + public System.Collections.Generic.IList ExcludePiiCategories { get { throw null; } } + public bool? LoggingOptOut { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + public System.Collections.Generic.IList PiiCategories { get { throw null; } } + public Azure.AI.Language.Documents.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } + public Azure.AI.Language.Documents.StringIndexType? StringIndexType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PiiCategoriesExclude : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PiiCategoriesExclude(string value) { throw null; } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AbaRoutingNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Address { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Age { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ArNationalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AtIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AtValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuBusinessNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuCompanyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuMedicalAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuTaxFileNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureDocumentDbauthKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureIaasDatabaseConnectionAndSqlString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureIoTConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzurePublishSettingPassword { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureRedisCacheString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureSas { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureServiceBusString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureStorageAccountGeneric { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureStorageAccountKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BeNationalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BeNationalNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BeValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BgUniformCivilNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BrCpfNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BrLegalEntityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BrNationalIdRg { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaHealthServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaPersonalHealthIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ChSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ClIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CnResidentIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CreditCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CyIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CyTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CzPersonalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CzPersonalIdentityV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Date { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DkPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DkPersonalIdentificationV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DrugEnforcementAgencyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EePersonalIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Email { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EsDni { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EsTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuDebitCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuGpsCoordinates { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiEuropeanHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrHealthInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude GrNationalIdCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude GrNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude GrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HkIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrNationalIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrPersonalIdentificationOIBNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HuPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HuValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IdIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IePersonalPublicServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IePersonalPublicServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IlBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude InPermanentAccount { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude InternationalBankingAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude InUniqueIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IPAddress { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ItDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ItFiscalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ItValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpMyNumberCorporate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpMyNumberPersonal { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpResidenceCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude KrResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LtPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LuNationalIdentificationNumberNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LuNationalIdentificationNumberNonNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LvPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude MtIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude MtTaxIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude MyIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlCitizensServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlCitizensServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NoIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzInlandRevenueNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzMinistryOfHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzSocialWelfareNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Organization { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Person { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PhoneNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PhUnifiedMultiPurposeIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlRegonNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PtCitizenCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PtCitizenCardNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude RoPersonalNumericalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude RuPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude RuPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SaNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SeNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SeNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SgNationalRegistrationIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SiTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SiUniqueMasterCitizenNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SkPersonalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SqlServerConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SwiftCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ThPopulationIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TrNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TwNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TwPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TwResidentCertificate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UaPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UaPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkElectoralRollNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkNationalHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkNationalInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkUniqueTaxpayerNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude URL { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsIndividualTaxpayerIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsUkPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ZaIdentificationNumber { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.PiiCategoriesExclude 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.AI.Language.Documents.PiiCategoriesExclude left, Azure.AI.Language.Documents.PiiCategoriesExclude right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.PiiCategoriesExclude (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.PiiCategoriesExclude left, Azure.AI.Language.Documents.PiiCategoriesExclude right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PiiCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PiiCategory(string value) { throw null; } + public static Azure.AI.Language.Documents.PiiCategory AbaRoutingNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Address { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Age { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory All { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ArNationalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AtIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AtValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuBusinessNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuCompanyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuMedicalAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuTaxFileNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureDocumentDbauthKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureIaasDatabaseConnectionAndSqlString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureIoTConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzurePublishSettingPassword { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureRedisCacheString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureSas { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureServiceBusString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureStorageAccountGeneric { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureStorageAccountKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BeNationalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BeNationalNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BeValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BgUniformCivilNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BrCpfNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BrLegalEntityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BrNationalIdRg { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaHealthServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaPersonalHealthIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ChSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ClIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CnResidentIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CreditCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CyIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CyTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CzPersonalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CzPersonalIdentityV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Date { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Default { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DkPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DkPersonalIdentificationV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DrugEnforcementAgencyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EePersonalIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Email { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EsDni { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EsTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuDebitCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuGpsCoordinates { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiEuropeanHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrHealthInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory GrNationalIdCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory GrNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory GrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HkIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrNationalIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrPersonalIdentificationOIBNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HuPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HuValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IdIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IePersonalPublicServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IePersonalPublicServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IlBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory InPermanentAccount { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory InternationalBankingAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory InUniqueIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IPAddress { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ItDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ItFiscalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ItValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpMyNumberCorporate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpMyNumberPersonal { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpResidenceCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory KrResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LtPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LuNationalIdentificationNumberNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LuNationalIdentificationNumberNonNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LvPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory MtIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory MtTaxIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory MyIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlCitizensServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlCitizensServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NoIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzInlandRevenueNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzMinistryOfHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzSocialWelfareNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Organization { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Person { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PhoneNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PhUnifiedMultiPurposeIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlRegonNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PtCitizenCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PtCitizenCardNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory RoPersonalNumericalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory RuPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory RuPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SaNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SeNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SeNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SgNationalRegistrationIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SiTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SiUniqueMasterCitizenNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SkPersonalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SqlServerConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SwiftCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ThPopulationIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TrNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TwNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TwPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TwResidentCertificate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UaPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UaPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkElectoralRollNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkNationalHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkNationalInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkUniqueTaxpayerNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory URL { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsIndividualTaxpayerIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsUkPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ZaIdentificationNumber { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.PiiCategory 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.AI.Language.Documents.PiiCategory left, Azure.AI.Language.Documents.PiiCategory right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.PiiCategory (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.PiiCategory left, Azure.AI.Language.Documents.PiiCategory right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PiiDomain : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PiiDomain(string value) { throw null; } + public static Azure.AI.Language.Documents.PiiDomain None { get { throw null; } } + public static Azure.AI.Language.Documents.PiiDomain Phi { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.PiiDomain 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.AI.Language.Documents.PiiDomain left, Azure.AI.Language.Documents.PiiDomain right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.PiiDomain (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.PiiDomain left, Azure.AI.Language.Documents.PiiDomain right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PiiEntityRecognitionOperationResult : Azure.AI.Language.Documents.AnalyzeDocumentsLROResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PiiEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Documents.DocumentActionState)) { } + public Azure.AI.Language.Documents.AnalyzeDocumentsResult Results { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiEntityRecognitionOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PiiLROTask : Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PiiLROTask() { } + public Azure.AI.Language.Documents.PiiActionContent Parameters { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiLROTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiLROTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 RedactionCharacter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedactionCharacter(string value) { throw null; } + public static Azure.AI.Language.Documents.RedactionCharacter Ampersand { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Asterisk { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter AtSign { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Caret { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Dollar { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter EqualsValue { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter ExclamationPoint { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Minus { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter NumberSign { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter PerCent { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Plus { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter QuestionMark { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Tilde { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Underscore { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.RedactionCharacter 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.AI.Language.Documents.RedactionCharacter left, Azure.AI.Language.Documents.RedactionCharacter right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.RedactionCharacter (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.RedactionCharacter left, Azure.AI.Language.Documents.RedactionCharacter right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RequestStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RequestStatistics() { } + public int DocumentsCount { get { throw null; } } + public int ErroneousDocumentsCount { get { throw null; } } + public long TransactionsCount { get { throw null; } } + public int ValidDocumentsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.RequestStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.RequestStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ScriptCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScriptCode(string value) { throw null; } + public static Azure.AI.Language.Documents.ScriptCode Arab { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Armn { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Beng { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Cans { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Cyrl { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Deva { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Ethi { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Geor { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Grek { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Gujr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Guru { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hang { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hans { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hant { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hebr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Jpan { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Khmr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Knda { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Laoo { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Latn { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Mlym { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Mymr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Orya { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Sinh { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Taml { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Telu { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Thaa { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Thai { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Tibt { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.ScriptCode 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.AI.Language.Documents.ScriptCode left, Azure.AI.Language.Documents.ScriptCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.ScriptCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.ScriptCode left, Azure.AI.Language.Documents.ScriptCode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ScriptKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScriptKind(string value) { throw null; } + public static Azure.AI.Language.Documents.ScriptKind Arabic { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Armenian { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Bangla { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Cyrillic { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Devanagari { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Ethiopic { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Georgian { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Greek { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Gujarati { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Gurmukhi { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Hangul { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind HanSimplified { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind HanTraditional { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Hebrew { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Japanese { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Kannada { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Khmer { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Lao { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Latin { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Malayalam { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Myanmar { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Odia { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Sinhala { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Tamil { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Telugu { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Thaana { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Thai { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Tibetan { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind UnifiedCanadianAboriginalSyllabics { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.ScriptKind 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.AI.Language.Documents.ScriptKind left, Azure.AI.Language.Documents.ScriptKind right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.ScriptKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.ScriptKind left, Azure.AI.Language.Documents.ScriptKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.Language.Documents.StringIndexType TextElementsV8 { get { throw null; } } + public static Azure.AI.Language.Documents.StringIndexType UnicodeCodePoint { get { throw null; } } + public static Azure.AI.Language.Documents.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.StringIndexType 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.AI.Language.Documents.StringIndexType left, Azure.AI.Language.Documents.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.StringIndexType left, Azure.AI.Language.Documents.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SummaryContext : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SummaryContext() { } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.SummaryContext System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.SummaryContext System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 SummaryLengthBucket : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SummaryLengthBucket(string value) { throw null; } + public static Azure.AI.Language.Documents.SummaryLengthBucket Long { get { throw null; } } + public static Azure.AI.Language.Documents.SummaryLengthBucket Medium { get { throw null; } } + public static Azure.AI.Language.Documents.SummaryLengthBucket Short { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.SummaryLengthBucket 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.AI.Language.Documents.SummaryLengthBucket left, Azure.AI.Language.Documents.SummaryLengthBucket right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.SummaryLengthBucket (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.SummaryLengthBucket left, Azure.AI.Language.Documents.SummaryLengthBucket right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WarningCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WarningCode(string value) { throw null; } + public static Azure.AI.Language.Documents.WarningCode DocumentTruncated { get { throw null; } } + public static Azure.AI.Language.Documents.WarningCode LongWordsInDocument { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.WarningCode 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.AI.Language.Documents.WarningCode left, Azure.AI.Language.Documents.WarningCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.WarningCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.WarningCode left, Azure.AI.Language.Documents.WarningCode right) { throw null; } + public override string ToString() { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageDocumentsClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAnalyzeDocumentsClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAnalyzeDocumentsClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/api/Azure.AI.Language.Documents.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/api/Azure.AI.Language.Documents.netstandard2.0.cs new file mode 100644 index 000000000000..466dcf7d0579 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/api/Azure.AI.Language.Documents.netstandard2.0.cs @@ -0,0 +1,1204 @@ +namespace Azure.AI.Language.Documents +{ + public partial class AbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AbstractiveSummarizationActionContent() { } + public string Instruction { get { throw null; } set { } } + public bool? LoggingOptOut { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + public int? SentenceCount { get { throw null; } set { } } + public Azure.AI.Language.Documents.StringIndexType? StringIndexType { get { throw null; } set { } } + public Azure.AI.Language.Documents.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummarizationOperationAction : Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AbstractiveSummarizationOperationAction(Azure.AI.Language.Documents.AbstractiveSummarizationActionContent actionContent) { } + public Azure.AI.Language.Documents.AbstractiveSummarizationActionContent ActionContent { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummarizationOperationResult : Azure.AI.Language.Documents.AnalyzeDocumentsLROResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Documents.DocumentActionState)) { } + public Azure.AI.Language.Documents.AbstractiveSummarizationResult Results { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummarizationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummarizationResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Documents.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummarizationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummary() { } + public System.Collections.Generic.IReadOnlyList Contexts { get { throw null; } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AbstractiveSummaryDocumentResultWithDetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AbstractiveSummaryDocumentResultWithDetectedLanguage() { } + public Azure.AI.Language.Documents.DetectedLanguage DetectedLanguage { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Language.Documents.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Summaries { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummaryDocumentResultWithDetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AbstractiveSummaryDocumentResultWithDetectedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 AILanguageDocumentsModelFactory + { + public static Azure.AI.Language.Documents.AbstractiveSummarizationOperationAction AbstractiveSummarizationOperationAction(string name = null, Azure.AI.Language.Documents.AbstractiveSummarizationActionContent actionContent = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummarizationOperationResult AbstractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, Azure.AI.Language.Documents.AbstractiveSummarizationResult results = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummarizationResult AbstractiveSummarizationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Documents.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummary AbstractiveSummary(string text = null, System.Collections.Generic.IEnumerable contexts = null) { throw null; } + public static Azure.AI.Language.Documents.AbstractiveSummaryDocumentResultWithDetectedLanguage AbstractiveSummaryDocumentResultWithDetectedLanguage(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Documents.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable summaries = null, Azure.AI.Language.Documents.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsDocumentError AnalyzeDocumentsDocumentError(string id = null, Azure.AI.Language.Documents.AnalyzeDocumentsError error = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsError AnalyzeDocumentsError(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode code = default(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Documents.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsJobState AnalyzeDocumentsJobState(string displayName = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?), System.Guid jobId = default(System.Guid), System.DateTimeOffset lastUpdatedAt = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), System.Collections.Generic.IEnumerable errors = null, string nextLink = null, Azure.AI.Language.Documents.DocumentActions tasks = null, Azure.AI.Language.Documents.RequestStatistics statistics = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsLROResult AnalyzeDocumentsLROResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, string kind = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput AnalyzeDocumentsOperationInput(string displayName = null, Azure.AI.Language.Documents.MultiLanguageDocumentInput documentsInput = null, System.Collections.Generic.IEnumerable actions = null, string defaultLanguage = null) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsResult AnalyzeDocumentsResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Documents.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Documents.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Documents.ScriptKind? script = default(Azure.AI.Language.Documents.ScriptKind?), Azure.AI.Language.Documents.ScriptCode? scriptCode = default(Azure.AI.Language.Documents.ScriptCode?)) { throw null; } + public static Azure.AI.Language.Documents.DocumentActions DocumentActions(int completed = 0, int failed = 0, int inProgress = 0, int total = 0, System.Collections.Generic.IEnumerable items = null) { throw null; } + public static Azure.AI.Language.Documents.DocumentAnalysisDocumentResult DocumentAnalysisDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Documents.DocumentStatistics statistics = null, Azure.AI.Language.Documents.DocumentLocation source = null, System.Collections.Generic.IEnumerable target = null) { throw null; } + public static Azure.AI.Language.Documents.DocumentError DocumentError(string id = null, Azure.AI.Language.Documents.AnalyzeDocumentsError error = null) { throw null; } + public static Azure.AI.Language.Documents.DocumentStatistics DocumentStatistics(int charactersCount = 0, int transactionsCount = 0) { throw null; } + public static Azure.AI.Language.Documents.DocumentWarning DocumentWarning(Azure.AI.Language.Documents.WarningCode code = default(Azure.AI.Language.Documents.WarningCode), string message = null, string targetRef = null) { throw null; } + public static Azure.AI.Language.Documents.ExtractiveSummarizationOperationResult ExtractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, Azure.AI.Language.Documents.AnalyzeDocumentsResult results = null) { throw null; } + public static Azure.AI.Language.Documents.InnerErrorModel InnerErrorModel(Azure.AI.Language.Documents.InnerErrorCode code = default(Azure.AI.Language.Documents.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Documents.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Documents.MultiLanguageInput MultiLanguageInput(string id = null, Azure.AI.Language.Documents.DocumentLocation source = null, Azure.AI.Language.Documents.DocumentLocation target = null, string language = null) { throw null; } + public static Azure.AI.Language.Documents.PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Documents.DocumentActionState status = default(Azure.AI.Language.Documents.DocumentActionState), string taskName = null, Azure.AI.Language.Documents.AnalyzeDocumentsResult results = null) { throw null; } + public static Azure.AI.Language.Documents.RequestStatistics RequestStatistics(int documentsCount = 0, int validDocumentsCount = 0, int erroneousDocumentsCount = 0, long transactionsCount = (long)0) { throw null; } + public static Azure.AI.Language.Documents.SummaryContext SummaryContext(int offset = 0, int length = 0) { throw null; } + } + public partial class AnalyzeDocumentsClient + { + protected AnalyzeDocumentsClient() { } + public AnalyzeDocumentsClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AnalyzeDocumentsClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Documents.AnalyzeDocumentsClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AnalyzeDocumentsCancelOperation(Azure.WaitUntil waitUntil, System.Guid jobId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeDocumentsCancelOperationAsync(Azure.WaitUntil waitUntil, System.Guid jobId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation AnalyzeDocumentsSubmitOperation(Azure.WaitUntil waitUntil, Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput analyzeDocumentOperationInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AnalyzeDocumentsSubmitOperation(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeDocumentsSubmitOperationAsync(Azure.WaitUntil waitUntil, Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput analyzeDocumentOperationInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeDocumentsSubmitOperationAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAnalyzeDocumentsJobStatus(System.Guid jobId, bool? showStats, int? top, int? skip, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAnalyzeDocumentsJobStatus(System.Guid jobId, bool? showStats = default(bool?), int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAnalyzeDocumentsJobStatusAsync(System.Guid jobId, bool? showStats, int? top, int? skip, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAnalyzeDocumentsJobStatusAsync(System.Guid jobId, bool? showStats = default(bool?), int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AnalyzeDocumentsClientOptions : Azure.Core.ClientOptions + { + public AnalyzeDocumentsClientOptions(Azure.AI.Language.Documents.AnalyzeDocumentsClientOptions.ServiceVersion version = Azure.AI.Language.Documents.AnalyzeDocumentsClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2024_11_15_Preview = 1, + } + } + public partial class AnalyzeDocumentsDocumentError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsDocumentError() { } + public Azure.AI.Language.Documents.AnalyzeDocumentsError Error { get { throw null; } } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsDocumentError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsDocumentError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AnalyzeDocumentsError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsError() { } + public Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Documents.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AnalyzeDocumentsErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AnalyzeDocumentsErrorCode(string value) { throw null; } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode 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.AI.Language.Documents.AnalyzeDocumentsErrorCode left, Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode left, Azure.AI.Language.Documents.AnalyzeDocumentsErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AnalyzeDocumentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsJobState() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + public System.Guid JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedAt { get { throw null; } } + public string NextLink { get { throw null; } } + public Azure.AI.Language.Documents.RequestStatistics Statistics { get { throw null; } } + public Azure.AI.Language.Documents.DocumentActionState Status { get { throw null; } } + public Azure.AI.Language.Documents.DocumentActions Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AnalyzeDocumentsLROResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AnalyzeDocumentsLROResult(System.DateTimeOffset lastUpdateDateTime, Azure.AI.Language.Documents.DocumentActionState status) { } + public System.DateTimeOffset LastUpdateDateTime { get { throw null; } } + public Azure.AI.Language.Documents.DocumentActionState Status { get { throw null; } } + public string TaskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsLROResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsLROResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AnalyzeDocumentsOperationAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AnalyzeDocumentsOperationAction() { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AnalyzeDocumentsOperationInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AnalyzeDocumentsOperationInput(Azure.AI.Language.Documents.MultiLanguageDocumentInput documentsInput, System.Collections.Generic.IEnumerable actions) { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public string DefaultLanguage { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.AI.Language.Documents.MultiLanguageDocumentInput DocumentsInput { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsOperationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AnalyzeDocumentsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AnalyzeDocumentsResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Documents.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AnalyzeDocumentsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureBlobDocumentLocation : Azure.AI.Language.Documents.DocumentLocation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureBlobDocumentLocation(string location) { } + public string Location { get { throw null; } set { } } + public string ManagedIdentityClientId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AzureBlobDocumentLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.AzureBlobDocumentLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CharacterMaskPolicy : Azure.AI.Language.Documents.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicy() { } + public Azure.AI.Language.Documents.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.CharacterMaskPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.CharacterMaskPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DetectedLanguage() { } + public double ConfidenceScore { get { throw null; } } + public string Iso6391Name { get { throw null; } } + public string Name { get { throw null; } } + public Azure.AI.Language.Documents.ScriptKind? Script { get { throw null; } } + public Azure.AI.Language.Documents.ScriptCode? ScriptCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DetectedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentActions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentActions() { } + public int Completed { get { throw null; } } + public int Failed { get { throw null; } } + public int InProgress { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Items { get { throw null; } } + public int Total { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentActions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentActions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DocumentActionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentActionState(string value) { throw null; } + public static Azure.AI.Language.Documents.DocumentActionState Cancelled { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Cancelling { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Failed { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState NotStarted { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Running { get { throw null; } } + public static Azure.AI.Language.Documents.DocumentActionState Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.DocumentActionState 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.AI.Language.Documents.DocumentActionState left, Azure.AI.Language.Documents.DocumentActionState right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.DocumentActionState (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.DocumentActionState left, Azure.AI.Language.Documents.DocumentActionState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DocumentAnalysisDocumentResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentAnalysisDocumentResult() { } + public string Id { get { throw null; } } + public Azure.AI.Language.Documents.DocumentLocation Source { get { throw null; } } + public Azure.AI.Language.Documents.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Target { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentAnalysisDocumentResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentAnalysisDocumentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentError() { } + public Azure.AI.Language.Documents.AnalyzeDocumentsError Error { get { throw null; } } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DocumentLocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DocumentLocation() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentStatistics() { } + public int CharactersCount { get { throw null; } } + public int TransactionsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentWarning() { } + public Azure.AI.Language.Documents.WarningCode Code { get { throw null; } } + public string Message { get { throw null; } } + public string TargetRef { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.DocumentWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityMaskPolicy : Azure.AI.Language.Documents.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskPolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.EntityMaskPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.EntityMaskPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExtractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExtractiveSummarizationActionContent() { } + public bool? LoggingOptOut { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + public string Query { get { throw null; } set { } } + public long? SentenceCount { get { throw null; } set { } } + public Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria? SortBy { get { throw null; } set { } } + public Azure.AI.Language.Documents.StringIndexType? StringIndexType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExtractiveSummarizationOperationAction : Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExtractiveSummarizationOperationAction() { } + public Azure.AI.Language.Documents.ExtractiveSummarizationActionContent ActionContent { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExtractiveSummarizationOperationResult : Azure.AI.Language.Documents.AnalyzeDocumentsLROResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExtractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Documents.DocumentActionState)) { } + public Azure.AI.Language.Documents.AnalyzeDocumentsResult Results { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.ExtractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ExtractiveSummarizationSortingCriteria : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExtractiveSummarizationSortingCriteria(string value) { throw null; } + public static Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria Offset { get { throw null; } } + public static Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria Rank { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria 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.AI.Language.Documents.ExtractiveSummarizationSortingCriteria left, Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria left, Azure.AI.Language.Documents.ExtractiveSummarizationSortingCriteria right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Documents.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Documents.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.InnerErrorCode 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.AI.Language.Documents.InnerErrorCode left, Azure.AI.Language.Documents.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.InnerErrorCode left, Azure.AI.Language.Documents.InnerErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InnerErrorModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InnerErrorModel() { } + public Azure.AI.Language.Documents.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Documents.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.InnerErrorModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLanguageDocumentInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MultiLanguageDocumentInput() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageDocumentInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageDocumentInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLanguageInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MultiLanguageInput(string id, Azure.AI.Language.Documents.DocumentLocation source, Azure.AI.Language.Documents.DocumentLocation target) { } + public string Id { get { throw null; } } + public string Language { get { throw null; } set { } } + public Azure.AI.Language.Documents.DocumentLocation Source { get { throw null; } } + public Azure.AI.Language.Documents.DocumentLocation Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.MultiLanguageInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NoMaskPolicy : Azure.AI.Language.Documents.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.NoMaskPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.NoMaskPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PiiActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PiiActionContent() { } + public Azure.AI.Language.Documents.PiiDomain? Domain { get { throw null; } set { } } + public bool? ExcludeExtractionData { get { throw null; } set { } } + public System.Collections.Generic.IList ExcludePiiCategories { get { throw null; } } + public bool? LoggingOptOut { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + public System.Collections.Generic.IList PiiCategories { get { throw null; } } + public Azure.AI.Language.Documents.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } + public Azure.AI.Language.Documents.StringIndexType? StringIndexType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PiiCategoriesExclude : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PiiCategoriesExclude(string value) { throw null; } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AbaRoutingNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Address { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Age { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ArNationalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AtIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AtValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuBusinessNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuCompanyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuMedicalAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AuTaxFileNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureDocumentDbauthKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureIaasDatabaseConnectionAndSqlString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureIoTConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzurePublishSettingPassword { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureRedisCacheString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureSas { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureServiceBusString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureStorageAccountGeneric { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude AzureStorageAccountKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BeNationalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BeNationalNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BeValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BgUniformCivilNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BrCpfNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BrLegalEntityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude BrNationalIdRg { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaHealthServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaPersonalHealthIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CaSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ChSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ClIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CnResidentIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CreditCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CyIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CyTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CzPersonalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude CzPersonalIdentityV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Date { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DeValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DkPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DkPersonalIdentificationV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude DrugEnforcementAgencyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EePersonalIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Email { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EsDni { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EsTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuDebitCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuGpsCoordinates { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude EuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiEuropeanHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FiPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrHealthInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude FrValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude GrNationalIdCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude GrNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude GrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HkIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrNationalIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HrPersonalIdentificationOIBNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HuPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude HuValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IdIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IePersonalPublicServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IePersonalPublicServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IlBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude InPermanentAccount { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude InternationalBankingAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude InUniqueIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude IPAddress { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ItDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ItFiscalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ItValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpMyNumberCorporate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpMyNumberPersonal { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpResidenceCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude JpSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude KrResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LtPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LuNationalIdentificationNumberNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LuNationalIdentificationNumberNonNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude LvPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude MtIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude MtTaxIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude MyIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlCitizensServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlCitizensServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NlValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NoIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzInlandRevenueNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzMinistryOfHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude NzSocialWelfareNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Organization { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude Person { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PhoneNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PhUnifiedMultiPurposeIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlRegonNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PtCitizenCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PtCitizenCardNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude PtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude RoPersonalNumericalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude RuPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude RuPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SaNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SeNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SeNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SgNationalRegistrationIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SiTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SiUniqueMasterCitizenNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SkPersonalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SqlServerConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude SwiftCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ThPopulationIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TrNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TwNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TwPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude TwResidentCertificate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UaPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UaPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkElectoralRollNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkNationalHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkNationalInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UkUniqueTaxpayerNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude URL { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsIndividualTaxpayerIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude UsUkPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategoriesExclude ZaIdentificationNumber { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.PiiCategoriesExclude 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.AI.Language.Documents.PiiCategoriesExclude left, Azure.AI.Language.Documents.PiiCategoriesExclude right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.PiiCategoriesExclude (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.PiiCategoriesExclude left, Azure.AI.Language.Documents.PiiCategoriesExclude right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PiiCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PiiCategory(string value) { throw null; } + public static Azure.AI.Language.Documents.PiiCategory AbaRoutingNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Address { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Age { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory All { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ArNationalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AtIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AtValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuBusinessNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuCompanyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuMedicalAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AuTaxFileNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureDocumentDbauthKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureIaasDatabaseConnectionAndSqlString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureIoTConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzurePublishSettingPassword { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureRedisCacheString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureSas { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureServiceBusString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureStorageAccountGeneric { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory AzureStorageAccountKey { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BeNationalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BeNationalNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BeValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BgUniformCivilNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BrCpfNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BrLegalEntityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory BrNationalIdRg { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaHealthServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaPersonalHealthIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CaSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ChSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ClIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CnResidentIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CreditCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CyIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CyTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CzPersonalIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory CzPersonalIdentityV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Date { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Default { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DeValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DkPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DkPersonalIdentificationV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory DrugEnforcementAgencyNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EePersonalIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Email { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EsDni { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EsTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuDebitCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuGpsCoordinates { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory EuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiEuropeanHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FiPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrHealthInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory FrValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory GrNationalIdCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory GrNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory GrTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HkIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrNationalIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HrPersonalIdentificationOIBNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HuPersonalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HuTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory HuValueAddedNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IdIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IePersonalPublicServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IePersonalPublicServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IlBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory InPermanentAccount { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory InternationalBankingAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory InUniqueIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory IPAddress { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ItDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ItFiscalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ItValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpMyNumberCorporate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpMyNumberPersonal { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpResidenceCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory JpSocialInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory KrResidentRegistrationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LtPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LuNationalIdentificationNumberNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LuNationalIdentificationNumberNonNatural { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory LvPersonalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory MtIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory MtTaxIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory MyIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlCitizensServiceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlCitizensServiceNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NlValueAddedTaxNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NoIdentityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzInlandRevenueNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzMinistryOfHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory NzSocialWelfareNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Organization { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory Person { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PhoneNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PhUnifiedMultiPurposeIdNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlIdentityCard { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlRegonNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PlTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PtCitizenCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PtCitizenCardNumberV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory PtTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory RoPersonalNumericalCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory RuPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory RuPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SaNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SeNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SeNationalIdV2 { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SePassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SeTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SgNationalRegistrationIdentityCardNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SiTaxIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SiUniqueMasterCitizenNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SkPersonalNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SqlServerConnectionString { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory SwiftCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ThPopulationIdentificationCode { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TrNationalIdentificationNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TwNationalId { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TwPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory TwResidentCertificate { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UaPassportNumberDomestic { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UaPassportNumberInternational { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkElectoralRollNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkNationalHealthNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkNationalInsuranceNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UkUniqueTaxpayerNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory URL { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsBankAccountNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsDriversLicenseNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsIndividualTaxpayerIdentification { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsSocialSecurityNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory UsUkPassportNumber { get { throw null; } } + public static Azure.AI.Language.Documents.PiiCategory ZaIdentificationNumber { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.PiiCategory 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.AI.Language.Documents.PiiCategory left, Azure.AI.Language.Documents.PiiCategory right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.PiiCategory (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.PiiCategory left, Azure.AI.Language.Documents.PiiCategory right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PiiDomain : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PiiDomain(string value) { throw null; } + public static Azure.AI.Language.Documents.PiiDomain None { get { throw null; } } + public static Azure.AI.Language.Documents.PiiDomain Phi { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.PiiDomain 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.AI.Language.Documents.PiiDomain left, Azure.AI.Language.Documents.PiiDomain right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.PiiDomain (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.PiiDomain left, Azure.AI.Language.Documents.PiiDomain right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PiiEntityRecognitionOperationResult : Azure.AI.Language.Documents.AnalyzeDocumentsLROResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PiiEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Documents.DocumentActionState)) { } + public Azure.AI.Language.Documents.AnalyzeDocumentsResult Results { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiEntityRecognitionOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PiiLROTask : Azure.AI.Language.Documents.AnalyzeDocumentsOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PiiLROTask() { } + public Azure.AI.Language.Documents.PiiActionContent Parameters { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiLROTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.PiiLROTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 RedactionCharacter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedactionCharacter(string value) { throw null; } + public static Azure.AI.Language.Documents.RedactionCharacter Ampersand { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Asterisk { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter AtSign { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Caret { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Dollar { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter EqualsValue { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter ExclamationPoint { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Minus { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter NumberSign { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter PerCent { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Plus { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter QuestionMark { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Tilde { get { throw null; } } + public static Azure.AI.Language.Documents.RedactionCharacter Underscore { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.RedactionCharacter 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.AI.Language.Documents.RedactionCharacter left, Azure.AI.Language.Documents.RedactionCharacter right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.RedactionCharacter (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.RedactionCharacter left, Azure.AI.Language.Documents.RedactionCharacter right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RequestStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RequestStatistics() { } + public int DocumentsCount { get { throw null; } } + public int ErroneousDocumentsCount { get { throw null; } } + public long TransactionsCount { get { throw null; } } + public int ValidDocumentsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.RequestStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.RequestStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ScriptCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScriptCode(string value) { throw null; } + public static Azure.AI.Language.Documents.ScriptCode Arab { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Armn { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Beng { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Cans { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Cyrl { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Deva { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Ethi { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Geor { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Grek { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Gujr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Guru { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hang { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hans { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hant { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Hebr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Jpan { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Khmr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Knda { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Laoo { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Latn { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Mlym { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Mymr { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Orya { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Sinh { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Taml { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Telu { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Thaa { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Thai { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptCode Tibt { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.ScriptCode 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.AI.Language.Documents.ScriptCode left, Azure.AI.Language.Documents.ScriptCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.ScriptCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.ScriptCode left, Azure.AI.Language.Documents.ScriptCode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ScriptKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ScriptKind(string value) { throw null; } + public static Azure.AI.Language.Documents.ScriptKind Arabic { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Armenian { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Bangla { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Cyrillic { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Devanagari { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Ethiopic { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Georgian { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Greek { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Gujarati { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Gurmukhi { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Hangul { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind HanSimplified { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind HanTraditional { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Hebrew { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Japanese { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Kannada { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Khmer { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Lao { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Latin { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Malayalam { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Myanmar { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Odia { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Sinhala { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Tamil { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Telugu { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Thaana { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Thai { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind Tibetan { get { throw null; } } + public static Azure.AI.Language.Documents.ScriptKind UnifiedCanadianAboriginalSyllabics { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.ScriptKind 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.AI.Language.Documents.ScriptKind left, Azure.AI.Language.Documents.ScriptKind right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.ScriptKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.ScriptKind left, Azure.AI.Language.Documents.ScriptKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StringIndexType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StringIndexType(string value) { throw null; } + public static Azure.AI.Language.Documents.StringIndexType TextElementsV8 { get { throw null; } } + public static Azure.AI.Language.Documents.StringIndexType UnicodeCodePoint { get { throw null; } } + public static Azure.AI.Language.Documents.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.StringIndexType 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.AI.Language.Documents.StringIndexType left, Azure.AI.Language.Documents.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.StringIndexType left, Azure.AI.Language.Documents.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SummaryContext : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SummaryContext() { } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.SummaryContext System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Documents.SummaryContext System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 SummaryLengthBucket : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SummaryLengthBucket(string value) { throw null; } + public static Azure.AI.Language.Documents.SummaryLengthBucket Long { get { throw null; } } + public static Azure.AI.Language.Documents.SummaryLengthBucket Medium { get { throw null; } } + public static Azure.AI.Language.Documents.SummaryLengthBucket Short { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.SummaryLengthBucket 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.AI.Language.Documents.SummaryLengthBucket left, Azure.AI.Language.Documents.SummaryLengthBucket right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.SummaryLengthBucket (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.SummaryLengthBucket left, Azure.AI.Language.Documents.SummaryLengthBucket right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WarningCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WarningCode(string value) { throw null; } + public static Azure.AI.Language.Documents.WarningCode DocumentTruncated { get { throw null; } } + public static Azure.AI.Language.Documents.WarningCode LongWordsInDocument { get { throw null; } } + public bool Equals(Azure.AI.Language.Documents.WarningCode 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.AI.Language.Documents.WarningCode left, Azure.AI.Language.Documents.WarningCode right) { throw null; } + public static implicit operator Azure.AI.Language.Documents.WarningCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Documents.WarningCode left, Azure.AI.Language.Documents.WarningCode right) { throw null; } + public override string ToString() { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageDocumentsClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAnalyzeDocumentsClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAnalyzeDocumentsClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Azure.AI.Language.Documents.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Azure.AI.Language.Documents.csproj new file mode 100644 index 000000000000..01e9d344268c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Azure.AI.Language.Documents.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.AI.Language.Documents client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.Language.Documents for Azure Data Plane + 1.0.0-beta.1 + Azure.AI.Language.Documents + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AILanguageDocumentsClientBuilderExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AILanguageDocumentsClientBuilderExtensions.cs new file mode 100644 index 000000000000..4e37c6f76c81 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AILanguageDocumentsClientBuilderExtensions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.Language.Documents; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AILanguageDocumentsClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddAnalyzeDocumentsClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new AnalyzeDocumentsClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAnalyzeDocumentsClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AILanguageDocumentsModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AILanguageDocumentsModelFactory.cs new file mode 100644 index 000000000000..cb4e81e80bbc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AILanguageDocumentsModelFactory.cs @@ -0,0 +1,382 @@ +// 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.AI.Language.Documents +{ + /// Model factory for models. + public static partial class AILanguageDocumentsModelFactory + { + /// Initializes a new instance of . + /// display name. + /// Date and time job created. + /// Date and time job expires. + /// job ID. + /// last updated date and time. + /// status. + /// errors. + /// next link. + /// List of tasks. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// A new instance for mocking. + public static AnalyzeDocumentsJobState AnalyzeDocumentsJobState(string displayName = null, DateTimeOffset createdAt = default, DateTimeOffset? expiresOn = null, Guid jobId = default, DateTimeOffset lastUpdatedAt = default, DocumentActionState status = default, IEnumerable errors = null, string nextLink = null, DocumentActions tasks = null, RequestStatistics statistics = null) + { + errors ??= new List(); + + return new AnalyzeDocumentsJobState( + displayName, + createdAt, + expiresOn, + jobId, + lastUpdatedAt, + status, + errors?.ToList(), + nextLink, + tasks, + statistics, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// The target of the error. + /// An array of details about specific errors that led to this reported error. + /// An object containing more specific information than the current object about the error. + /// A new instance for mocking. + public static AnalyzeDocumentsError AnalyzeDocumentsError(AnalyzeDocumentsErrorCode code = default, string message = null, string target = null, IEnumerable details = null, InnerErrorModel innererror = null) + { + details ??= new List(); + + return new AnalyzeDocumentsError( + code, + message, + target, + details?.ToList(), + innererror, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// Error details. + /// Error target. + /// An object containing more specific information than the current object about the error. + /// A new instance for mocking. + public static InnerErrorModel InnerErrorModel(InnerErrorCode code = default, string message = null, IReadOnlyDictionary details = null, string target = null, InnerErrorModel innererror = null) + { + details ??= new Dictionary(); + + return new InnerErrorModel( + code, + message, + details, + target, + innererror, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Count of completed tasks. + /// Count of failed tasks. + /// Count of inprogress tasks. + /// Count of total tasks. + /// + /// Enumerable of Analyze documents job results. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static DocumentActions DocumentActions(int completed = default, int failed = default, int inProgress = default, int total = default, IEnumerable items = null) + { + items ??= new List(); + + return new DocumentActions( + completed, + failed, + inProgress, + total, + items?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// A new instance for mocking. + public static AnalyzeDocumentsLROResult AnalyzeDocumentsLROResult(DateTimeOffset lastUpdateDateTime = default, DocumentActionState status = default, string taskName = null, string kind = null) + { + return new UnknownAnalyzeDocumentsLROResult(lastUpdateDateTime, status, taskName, kind == null ? default : new AnalyzeDocumentsOperationResultsKind(kind), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// The list of pii document results. + /// A new instance for mocking. + public static PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime = default, DocumentActionState status = default, string taskName = null, AnalyzeDocumentsResult results = null) + { + return new PiiEntityRecognitionOperationResult( + lastUpdateDateTime, + status, + taskName, + AnalyzeDocumentsOperationResultsKind.PiiEntityRecognitionOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// Errors by document id. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// This field indicates which model is used for analysis. + /// Response by document. + /// A new instance for mocking. + public static AnalyzeDocumentsResult AnalyzeDocumentsResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + { + errors ??= new List(); + documents ??= new List(); + + return new AnalyzeDocumentsResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Document Id. + /// Document Error. + /// A new instance for mocking. + public static AnalyzeDocumentsDocumentError AnalyzeDocumentsDocumentError(string id = null, AnalyzeDocumentsError error = null) + { + return new AnalyzeDocumentsDocumentError(id, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of documents submitted in the request. + /// Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. + /// Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. + /// Number of transactions for the request. + /// A new instance for mocking. + public static RequestStatistics RequestStatistics(int documentsCount = default, int validDocumentsCount = default, int erroneousDocumentsCount = default, long transactionsCount = default) + { + return new RequestStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transactionsCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique, non-empty document identifier. + /// Warnings encountered while processing document. + /// if showStats=true was specified in the request this field will contain information about the document payload. + /// + /// Location of the input document. + /// 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 . + /// + /// + /// Array of document results generated after the analysis. + /// 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 DocumentAnalysisDocumentResult DocumentAnalysisDocumentResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, DocumentLocation source = null, IEnumerable target = null) + { + warnings ??= new List(); + target ??= new List(); + + return new DocumentAnalysisDocumentResult( + id, + warnings?.ToList(), + statistics, + source, + target?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Warning code. + /// Warning message. + /// A JSON pointer reference indicating the target object. + /// A new instance for mocking. + public static DocumentWarning DocumentWarning(WarningCode code = default, string message = null, string targetRef = null) + { + return new DocumentWarning(code, message, targetRef, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of documents elements recognized in the document. + /// Number of transactions for the document. + /// A new instance for mocking. + public static DocumentStatistics DocumentStatistics(int charactersCount = default, int transactionsCount = default) + { + return new DocumentStatistics(charactersCount, transactionsCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Results of the document task. + /// A new instance for mocking. + public static ExtractiveSummarizationOperationResult ExtractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, DocumentActionState status = default, string taskName = null, AnalyzeDocumentsResult results = null) + { + return new ExtractiveSummarizationOperationResult( + lastUpdateDateTime, + status, + taskName, + AnalyzeDocumentsOperationResultsKind.ExtractiveSummarizationOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Results of the task. + /// A new instance for mocking. + public static AbstractiveSummarizationOperationResult AbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, DocumentActionState status = default, string taskName = null, AbstractiveSummarizationResult results = null) + { + return new AbstractiveSummarizationOperationResult( + lastUpdateDateTime, + status, + taskName, + AnalyzeDocumentsOperationResultsKind.AbstractiveSummarizationOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// Errors by document id. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// This field indicates which model is used for scoring. + /// Response by document. + /// A new instance for mocking. + public static AbstractiveSummarizationResult AbstractiveSummarizationResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + { + errors ??= new List(); + documents ??= new List(); + + return new AbstractiveSummarizationResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the input document. + /// Error encountered. + /// A new instance for mocking. + public static DocumentError DocumentError(string id = null, AnalyzeDocumentsError error = null) + { + return new DocumentError(id, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique, non-empty document identifier. + /// Warnings encountered while processing document. + /// if showStats=true was specified in the request this field will contain information about the document payload. + /// A list of abstractive summaries. + /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. + /// A new instance for mocking. + public static AbstractiveSummaryDocumentResultWithDetectedLanguage AbstractiveSummaryDocumentResultWithDetectedLanguage(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable summaries = null, DetectedLanguage detectedLanguage = null) + { + warnings ??= new List(); + summaries ??= new List(); + + return new AbstractiveSummaryDocumentResultWithDetectedLanguage( + id, + warnings?.ToList(), + statistics, + summaries?.ToList(), + detectedLanguage, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The text of the summary. + /// The context list of the summary. + /// A new instance for mocking. + public static AbstractiveSummary AbstractiveSummary(string text = null, IEnumerable contexts = null) + { + contexts ??= new List(); + + return new AbstractiveSummary(text, contexts?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. + /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. + /// A new instance for mocking. + public static SummaryContext SummaryContext(int offset = default, int length = default) + { + return new SummaryContext(offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Long name of a detected language (e.g. English, French). + /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). + /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. + /// Identifies the script of the input document. + /// Identifies the script of the input document. + /// A new instance for mocking. + public static DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = default, ScriptKind? script = null, ScriptCode? scriptCode = null) + { + return new DetectedLanguage( + name, + iso6391Name, + confidenceScore, + script, + scriptCode, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name for the task. + /// Contains the input to be analyzed. + /// + /// List of tasks to be performed as part of the LRO. + /// 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 . + /// + /// Default language to use for records. + /// A new instance for mocking. + public static AnalyzeDocumentsOperationInput AnalyzeDocumentsOperationInput(string displayName = null, MultiLanguageDocumentInput documentsInput = null, IEnumerable actions = null, string defaultLanguage = null) + { + actions ??= new List(); + + return new AnalyzeDocumentsOperationInput(displayName, documentsInput, actions?.ToList(), defaultLanguage, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A unique, non-empty document identifier. + /// + /// The location of the input document to process. + /// 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 . + /// + /// + /// The location where the processed document will be stored. + /// 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 . + /// + /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default. + /// A new instance for mocking. + public static MultiLanguageInput MultiLanguageInput(string id = null, DocumentLocation source = null, DocumentLocation target = null, string language = null) + { + return new MultiLanguageInput(id, source, target, language, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// task name. + /// Parameters for the Abstractive Summarization task. + /// A new instance for mocking. + public static AbstractiveSummarizationOperationAction AbstractiveSummarizationOperationAction(string name = null, AbstractiveSummarizationActionContent actionContent = null) + { + return new AbstractiveSummarizationOperationAction(name, AnalyzeDocumentsOperationActionKind.AbstractiveSummarization, serializedAdditionalRawData: null, actionContent); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs similarity index 66% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs index a4b6b8ff1942..8a4f86be2c7b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomAbstractiveSummarizationActionContent : IUtf8JsonSerializable, IJsonModel + public partial class AbstractiveSummarizationActionContent : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,12 +28,22 @@ void IJsonModel.Write(Utf8JsonWrite /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationActionContent)} does not support writing '{format}' format."); } + if (Optional.IsDefined(LoggingOptOut)) + { + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); + } + if (Optional.IsDefined(ModelVersion)) + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } if (Optional.IsDefined(SentenceCount)) { writer.WritePropertyName("sentenceCount"u8); @@ -49,15 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("summaryLength"u8); writer.WriteStringValue(SummaryLength.Value.ToString()); } - if (Optional.IsDefined(LoggingOptOut)) + if (Optional.IsDefined(Instruction)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); + writer.WritePropertyName("instruction"u8); + writer.WriteStringValue(Instruction); } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,19 +81,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomAbstractiveSummarizationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AbstractiveSummarizationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationActionContent)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationActionContent(document.RootElement, options); + return DeserializeAbstractiveSummarizationActionContent(document.RootElement, options); } - internal static CustomAbstractiveSummarizationActionContent DeserializeCustomAbstractiveSummarizationActionContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSummarizationActionContent(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -95,60 +101,60 @@ internal static CustomAbstractiveSummarizationActionContent DeserializeCustomAbs { return null; } + bool? loggingOptOut = default; + string modelVersion = default; int? sentenceCount = default; StringIndexType? stringIndexType = default; SummaryLengthBucket? summaryLength = default; - bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; + string instruction = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sentenceCount"u8)) + if (property.NameEquals("loggingOptOut"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - sentenceCount = property.Value.GetInt32(); + loggingOptOut = property.Value.GetBoolean(); continue; } - if (property.NameEquals("stringIndexType"u8)) + if (property.NameEquals("modelVersion"u8)) + { + modelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sentenceCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - stringIndexType = new StringIndexType(property.Value.GetString()); + sentenceCount = property.Value.GetInt32(); continue; } - if (property.NameEquals("summaryLength"u8)) + if (property.NameEquals("stringIndexType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - summaryLength = new SummaryLengthBucket(property.Value.GetString()); + stringIndexType = new StringIndexType(property.Value.GetString()); continue; } - if (property.NameEquals("loggingOptOut"u8)) + if (property.NameEquals("summaryLength"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); + summaryLength = new SummaryLengthBucket(property.Value.GetString()); continue; } - if (property.NameEquals("deploymentName"u8)) + if (property.NameEquals("instruction"u8)) { - deploymentName = property.Value.GetString(); + instruction = property.Value.GetString(); continue; } if (options.Format != "W") @@ -157,53 +163,53 @@ internal static CustomAbstractiveSummarizationActionContent DeserializeCustomAbs } } serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationActionContent( + return new AbstractiveSummarizationActionContent( + loggingOptOut, + modelVersion, sentenceCount, stringIndexType, summaryLength, - loggingOptOut, - projectName, - deploymentName, + instruction, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationActionContent)} does not support writing '{options.Format}' format."); } } - CustomAbstractiveSummarizationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AbstractiveSummarizationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationActionContent(document.RootElement, options); + return DeserializeAbstractiveSummarizationActionContent(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationActionContent)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomAbstractiveSummarizationActionContent FromResponse(Response response) + internal static AbstractiveSummarizationActionContent FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationActionContent(document.RootElement); + return DeserializeAbstractiveSummarizationActionContent(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationActionContent.cs similarity index 57% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationActionContent.cs index 25897ca10c5c..22ef2e418953 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationActionContent.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - /// Supported parameters for the Custom Abstractive Summarization task. - public partial class CustomAbstractiveSummarizationActionContent + /// Supported parameters for the pre-built Abstractive Summarization task. + public partial class AbstractiveSummarizationActionContent { /// /// Keeps track of any properties unknown to the library. @@ -45,54 +45,41 @@ public partial class CustomAbstractiveSummarizationActionContent /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomAbstractiveSummarizationActionContent(string projectName, string deploymentName) + /// Initializes a new instance of . + public AbstractiveSummarizationActionContent() { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// logging opt out. + /// model version. /// Controls the approximate number of sentences in the output summaries. /// String index type. /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. + /// (Optional) If provided, the instruction will be used to generate the summary. /// Keeps track of any properties unknown to the library. - internal CustomAbstractiveSummarizationActionContent(int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, bool? loggingOptOut, string projectName, string deploymentName, IDictionary serializedAdditionalRawData) + internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, string instruction, IDictionary serializedAdditionalRawData) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; SentenceCount = sentenceCount; StringIndexType = stringIndexType; SummaryLength = summaryLength; - LoggingOptOut = loggingOptOut; - ProjectName = projectName; - DeploymentName = deploymentName; + Instruction = instruction; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationActionContent() - { - } - + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } /// Controls the approximate number of sentences in the output summaries. public int? SentenceCount { get; set; } /// String index type. public StringIndexType? StringIndexType { get; set; } /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. public SummaryLengthBucket? SummaryLength { get; set; } - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } + /// (Optional) If provided, the instruction will be used to generate the summary. + public string Instruction { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.Serialization.cs similarity index 54% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.Serialization.cs index f82979a4eaca..5507e1c2d5b2 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomAbstractiveSummarizationOperationAction : IUtf8JsonSerializable, IJsonModel + public partial class AbstractiveSummarizationOperationAction : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWri /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationAction)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -39,19 +39,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(ActionContent, options); } - CustomAbstractiveSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AbstractiveSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationAction)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement, options); + return DeserializeAbstractiveSummarizationOperationAction(document.RootElement, options); } - internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomAbstractiveSummarizationOperationAction(JsonElement element, ModelReaderWriterOptions options = null) + internal static AbstractiveSummarizationOperationAction DeserializeAbstractiveSummarizationOperationAction(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,16 +59,16 @@ internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomA { return null; } - CustomAbstractiveSummarizationActionContent parameters = default; + AbstractiveSummarizationActionContent parameters = default; string taskName = default; - AnalyzeTextOperationActionKind kind = default; + AnalyzeDocumentsOperationActionKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("parameters"u8)) { - parameters = CustomAbstractiveSummarizationActionContent.DeserializeCustomAbstractiveSummarizationActionContent(property.Value, options); + parameters = AbstractiveSummarizationActionContent.DeserializeAbstractiveSummarizationActionContent(property.Value, options); continue; } if (property.NameEquals("taskName"u8)) @@ -78,7 +78,7 @@ internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomA } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationActionKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -87,46 +87,46 @@ internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomA } } serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationOperationAction(taskName, kind, serializedAdditionalRawData, parameters); + return new AbstractiveSummarizationOperationAction(taskName, kind, serializedAdditionalRawData, parameters); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationAction)} does not support writing '{options.Format}' format."); } } - CustomAbstractiveSummarizationOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AbstractiveSummarizationOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement, options); + return DeserializeAbstractiveSummarizationOperationAction(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationAction)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomAbstractiveSummarizationOperationAction FromResponse(Response response) + internal static new AbstractiveSummarizationOperationAction FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement); + return DeserializeAbstractiveSummarizationOperationAction(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.cs new file mode 100644 index 000000000000..5336417d369a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationAction.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// An object representing the task definition for an Abstractive Summarization task. + public partial class AbstractiveSummarizationOperationAction : AnalyzeDocumentsOperationAction + { + /// Initializes a new instance of . + /// Parameters for the Abstractive Summarization task. + /// is null. + public AbstractiveSummarizationOperationAction(AbstractiveSummarizationActionContent actionContent) + { + Argument.AssertNotNull(actionContent, nameof(actionContent)); + + Kind = AnalyzeDocumentsOperationActionKind.AbstractiveSummarization; + ActionContent = actionContent; + } + + /// Initializes a new instance of . + /// task name. + /// The kind of task to perform. + /// Keeps track of any properties unknown to the library. + /// Parameters for the Abstractive Summarization task. + internal AbstractiveSummarizationOperationAction(string name, AnalyzeDocumentsOperationActionKind kind, IDictionary serializedAdditionalRawData, AbstractiveSummarizationActionContent actionContent) : base(name, kind, serializedAdditionalRawData) + { + ActionContent = actionContent; + } + + /// Initializes a new instance of for deserialization. + internal AbstractiveSummarizationOperationAction() + { + } + + /// Parameters for the Abstractive Summarization task. + public AbstractiveSummarizationActionContent ActionContent { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationResult.Serialization.cs similarity index 58% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationResult.Serialization.cs index a174b02dac83..14719c91eee2 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomAbstractiveSummarizationOperationResult : IUtf8JsonSerializable, IJsonModel + public partial class AbstractiveSummarizationOperationResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWri /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationResult)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -39,19 +39,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Results, options); } - CustomAbstractiveSummarizationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AbstractiveSummarizationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationOperationResult(document.RootElement, options); + return DeserializeAbstractiveSummarizationOperationResult(document.RootElement, options); } - internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomAbstractiveSummarizationOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static AbstractiveSummarizationOperationResult DeserializeAbstractiveSummarizationOperationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,18 +59,18 @@ internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomA { return null; } - CustomAbstractiveSummarizationResult results = default; + AbstractiveSummarizationResult results = default; DateTimeOffset lastUpdateDateTime = default; - TextActionState status = default; + DocumentActionState status = default; string taskName = default; - AnalyzeTextOperationResultsKind kind = default; + AnalyzeDocumentsOperationResultsKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) { - results = CustomAbstractiveSummarizationResult.DeserializeCustomAbstractiveSummarizationResult(property.Value, options); + results = AbstractiveSummarizationResult.DeserializeAbstractiveSummarizationResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) @@ -80,7 +80,7 @@ internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomA } if (property.NameEquals("status"u8)) { - status = new TextActionState(property.Value.GetString()); + status = new DocumentActionState(property.Value.GetString()); continue; } if (property.NameEquals("taskName"u8)) @@ -90,7 +90,7 @@ internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomA } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextOperationResultsKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationResultsKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomA } } serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationOperationResult( + return new AbstractiveSummarizationOperationResult( lastUpdateDateTime, status, taskName, @@ -108,43 +108,43 @@ internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomA results); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationResult)} does not support writing '{options.Format}' format."); } } - CustomAbstractiveSummarizationOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AbstractiveSummarizationOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationOperationResult(document.RootElement, options); + return DeserializeAbstractiveSummarizationOperationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationOperationResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomAbstractiveSummarizationOperationResult FromResponse(Response response) + internal static new AbstractiveSummarizationOperationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationOperationResult(document.RootElement); + return DeserializeAbstractiveSummarizationOperationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationResult.cs new file mode 100644 index 000000000000..a512b495d481 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationOperationResult.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// An object representing the results for an Abstractive Summarization task. + public partial class AbstractiveSummarizationOperationResult : AnalyzeDocumentsLROResult + { + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Results of the task. + /// is null. + internal AbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, AbstractiveSummarizationResult results) : base(lastUpdateDateTime, status) + { + Argument.AssertNotNull(results, nameof(results)); + + Kind = AnalyzeDocumentsOperationResultsKind.AbstractiveSummarizationOperationResults; + Results = results; + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Keeps track of any properties unknown to the library. + /// Results of the task. + internal AbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, string taskName, AnalyzeDocumentsOperationResultsKind kind, IDictionary serializedAdditionalRawData, AbstractiveSummarizationResult results) : base(lastUpdateDateTime, status, taskName, kind, serializedAdditionalRawData) + { + Results = results; + } + + /// Initializes a new instance of for deserialization. + internal AbstractiveSummarizationOperationResult() + { + } + + /// Results of the task. + public AbstractiveSummarizationResult Results { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationResult.Serialization.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationResult.Serialization.cs index a9e170af6c6f..d74816abb131 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomSentimentAnalysisResult : IUtf8JsonSerializable, IJsonModel + public partial class AbstractiveSummarizationResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -46,10 +46,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("statistics"u8); writer.WriteObjectValue(Statistics, options); } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); writer.WritePropertyName("documents"u8); writer.WriteStartArray(); foreach (var item in Documents) @@ -74,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomSentimentAnalysisResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AbstractiveSummarizationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisResult(document.RootElement, options); + return DeserializeAbstractiveSummarizationResult(document.RootElement, options); } - internal static CustomSentimentAnalysisResult DeserializeCustomSentimentAnalysisResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static AbstractiveSummarizationResult DeserializeAbstractiveSummarizationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -96,9 +94,8 @@ internal static CustomSentimentAnalysisResult DeserializeCustomSentimentAnalysis } IReadOnlyList errors = default; RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; - IReadOnlyList documents = default; + string modelVersion = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -122,22 +119,17 @@ internal static CustomSentimentAnalysisResult DeserializeCustomSentimentAnalysis statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); continue; } - if (property.NameEquals("projectName"u8)) + if (property.NameEquals("modelVersion"u8)) { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); + modelVersion = property.Value.GetString(); continue; } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CustomSentimentAnalysisResultDocument.DeserializeCustomSentimentAnalysisResultDocument(item, options)); + array.Add(AbstractiveSummaryDocumentResultWithDetectedLanguage.DeserializeAbstractiveSummaryDocumentResultWithDetectedLanguage(item, options)); } documents = array; continue; @@ -148,52 +140,46 @@ internal static CustomSentimentAnalysisResult DeserializeCustomSentimentAnalysis } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisResult( - errors, - statistics, - projectName, - deploymentName, - documents, - serializedAdditionalRawData); + return new AbstractiveSummarizationResult(errors, statistics, modelVersion, documents, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationResult)} does not support writing '{options.Format}' format."); } } - CustomSentimentAnalysisResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AbstractiveSummarizationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisResult(document.RootElement, options); + return DeserializeAbstractiveSummarizationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummarizationResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomSentimentAnalysisResult FromResponse(Response response) + internal static AbstractiveSummarizationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisResult(document.RootElement); + return DeserializeAbstractiveSummarizationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationResult.cs similarity index 56% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationResult.cs index ecd4baccb173..a48b44f07c86 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummarizationResult.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - /// An object representing the custom summarization results of each document. - public partial class CustomAbstractiveSummarizationResult + /// An object representing the pre-built Abstractive Summarization results of each document. + public partial class AbstractiveSummarizationResult { /// /// Keeps track of any properties unknown to the library. @@ -46,56 +46,49 @@ public partial class CustomAbstractiveSummarizationResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// Response by document. + /// Initializes a new instance of . /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// , , or is null. - internal CustomAbstractiveSummarizationResult(IEnumerable documents, IEnumerable errors, string projectName, string deploymentName) + /// This field indicates which model is used for scoring. + /// Response by document. + /// , or is null. + internal AbstractiveSummarizationResult(IEnumerable errors, string modelVersion, IEnumerable documents) { - Argument.AssertNotNull(documents, nameof(documents)); Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); + Argument.AssertNotNull(documents, nameof(documents)); - Documents = documents.ToList(); Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; + ModelVersion = modelVersion; + Documents = documents.ToList(); } - /// Initializes a new instance of . - /// Response by document. + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. + /// This field indicates which model is used for scoring. + /// Response by document. /// Keeps track of any properties unknown to the library. - internal CustomAbstractiveSummarizationResult(IReadOnlyList documents, IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IDictionary serializedAdditionalRawData) + internal AbstractiveSummarizationResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { - Documents = documents; Errors = errors; Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; + ModelVersion = modelVersion; + Documents = documents; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationResult() + /// Initializes a new instance of for deserialization. + internal AbstractiveSummarizationResult() { } - /// Response by document. - public IReadOnlyList Documents { get; } /// Errors by document id. public IReadOnlyList Errors { get; } /// if showStats=true was specified in the request this field will contain information about the request payload. public RequestStatistics Statistics { get; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } + /// Response by document. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummary.Serialization.cs new file mode 100644 index 000000000000..c28aba0dede5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummary.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class AbstractiveSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AbstractiveSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsCollectionDefined(Contexts)) + { + writer.WritePropertyName("contexts"u8); + writer.WriteStartArray(); + foreach (var item in Contexts) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AbstractiveSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AbstractiveSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAbstractiveSummary(document.RootElement, options); + } + + internal static AbstractiveSummary DeserializeAbstractiveSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + IReadOnlyList contexts = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("contexts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SummaryContext.DeserializeSummaryContext(item, options)); + } + contexts = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AbstractiveSummary(text, contexts ?? 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(AbstractiveSummary)} does not support writing '{options.Format}' format."); + } + } + + AbstractiveSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAbstractiveSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AbstractiveSummary)} 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 AbstractiveSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAbstractiveSummary(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummary.cs new file mode 100644 index 000000000000..5da33f48152e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummary.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// An object representing a single summary with context for given document. + public partial class AbstractiveSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 text of the summary. + /// is null. + internal AbstractiveSummary(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + Contexts = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The text of the summary. + /// The context list of the summary. + /// Keeps track of any properties unknown to the library. + internal AbstractiveSummary(string text, IReadOnlyList contexts, IDictionary serializedAdditionalRawData) + { + Text = text; + Contexts = contexts; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AbstractiveSummary() + { + } + + /// The text of the summary. + public string Text { get; } + /// The context list of the summary. + public IReadOnlyList Contexts { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummaryDocumentResultWithDetectedLanguage.Serialization.cs similarity index 64% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummaryDocumentResultWithDetectedLanguage.Serialization.cs index c426dc5dd63d..c897d49851bd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummaryDocumentResultWithDetectedLanguage.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomHealthcareActionResult : IUtf8JsonSerializable, IJsonModel + public partial class AbstractiveSummaryDocumentResultWithDetectedLanguage : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummaryDocumentResultWithDetectedLanguage)} does not support writing '{format}' format."); } writer.WritePropertyName("id"u8); @@ -48,16 +48,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("statistics"u8); writer.WriteObjectValue(Statistics, options); } - writer.WritePropertyName("entities"u8); + writer.WritePropertyName("summaries"u8); writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("relations"u8); - writer.WriteStartArray(); - foreach (var item in Relations) + foreach (var item in Summaries) { writer.WriteObjectValue(item, options); } @@ -84,19 +77,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AbstractiveSummaryDocumentResultWithDetectedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummaryDocumentResultWithDetectedLanguage)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareActionResult(document.RootElement, options); + return DeserializeAbstractiveSummaryDocumentResultWithDetectedLanguage(document.RootElement, options); } - internal static CustomHealthcareActionResult DeserializeCustomHealthcareActionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static AbstractiveSummaryDocumentResultWithDetectedLanguage DeserializeAbstractiveSummaryDocumentResultWithDetectedLanguage(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -107,8 +100,7 @@ internal static CustomHealthcareActionResult DeserializeCustomHealthcareActionRe string id = default; IReadOnlyList warnings = default; DocumentStatistics statistics = default; - IReadOnlyList entities = default; - IReadOnlyList relations = default; + IReadOnlyList summaries = default; DetectedLanguage detectedLanguage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -138,24 +130,14 @@ internal static CustomHealthcareActionResult DeserializeCustomHealthcareActionRe statistics = DocumentStatistics.DeserializeDocumentStatistics(property.Value, options); continue; } - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomHealthcareEntity.DeserializeCustomHealthcareEntity(item, options)); - } - entities = array; - continue; - } - if (property.NameEquals("relations"u8)) + if (property.NameEquals("summaries"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HealthcareRelation.DeserializeHealthcareRelation(item, options)); + array.Add(AbstractiveSummary.DeserializeAbstractiveSummary(item, options)); } - relations = array; + summaries = array; continue; } if (property.NameEquals("detectedLanguage"u8)) @@ -173,53 +155,52 @@ internal static CustomHealthcareActionResult DeserializeCustomHealthcareActionRe } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareActionResult( + return new AbstractiveSummaryDocumentResultWithDetectedLanguage( id, warnings, statistics, - entities, - relations, + summaries, detectedLanguage, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummaryDocumentResultWithDetectedLanguage)} does not support writing '{options.Format}' format."); } } - CustomHealthcareActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AbstractiveSummaryDocumentResultWithDetectedLanguage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareActionResult(document.RootElement, options); + return DeserializeAbstractiveSummaryDocumentResultWithDetectedLanguage(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AbstractiveSummaryDocumentResultWithDetectedLanguage)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomHealthcareActionResult FromResponse(Response response) + internal static AbstractiveSummaryDocumentResultWithDetectedLanguage FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareActionResult(document.RootElement); + return DeserializeAbstractiveSummaryDocumentResultWithDetectedLanguage(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummaryDocumentResultWithDetectedLanguage.cs similarity index 64% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummaryDocumentResultWithDetectedLanguage.cs index 6543bc91aace..40fbfed521a6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AbstractiveSummaryDocumentResultWithDetectedLanguage.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - /// Contains the document custom healthcare results with detected language. - public partial class CustomHealthcareActionResult + /// An object representing the Abstractive Summarization result of a single document with detected language. + public partial class AbstractiveSummaryDocumentResultWithDetectedLanguage { /// /// Keeps track of any properties unknown to the library. @@ -46,46 +46,41 @@ public partial class CustomHealthcareActionResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. - /// Healthcare entities. - /// Healthcare entity relations. - /// , , or is null. - internal CustomHealthcareActionResult(string id, IEnumerable warnings, IEnumerable entities, IEnumerable relations) + /// A list of abstractive summaries. + /// , or is null. + internal AbstractiveSummaryDocumentResultWithDetectedLanguage(string id, IEnumerable warnings, IEnumerable summaries) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(entities, nameof(entities)); - Argument.AssertNotNull(relations, nameof(relations)); + Argument.AssertNotNull(summaries, nameof(summaries)); Id = id; Warnings = warnings.ToList(); - Entities = entities.ToList(); - Relations = relations.ToList(); + Summaries = summaries.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Healthcare entities. - /// Healthcare entity relations. + /// A list of abstractive summaries. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// Keeps track of any properties unknown to the library. - internal CustomHealthcareActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, IReadOnlyList relations, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) + internal AbstractiveSummaryDocumentResultWithDetectedLanguage(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList summaries, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; Statistics = statistics; - Entities = entities; - Relations = relations; + Summaries = summaries; DetectedLanguage = detectedLanguage; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomHealthcareActionResult() + /// Initializes a new instance of for deserialization. + internal AbstractiveSummaryDocumentResultWithDetectedLanguage() { } @@ -95,10 +90,8 @@ internal CustomHealthcareActionResult() public IReadOnlyList Warnings { get; } /// if showStats=true was specified in the request this field will contain information about the document payload. public DocumentStatistics Statistics { get; } - /// Healthcare entities. - public IReadOnlyList Entities { get; } - /// Healthcare entity relations. - public IReadOnlyList Relations { get; } + /// A list of abstractive summaries. + public IReadOnlyList Summaries { get; } /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. public DetectedLanguage DetectedLanguage { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsClient.cs new file mode 100644 index 000000000000..38aee03bea6c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsClient.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Documents +{ + // Data plane generated client. + /// + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. + /// The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. + /// Further documentation can be found in <a href=\"https://learn.microsoft.com/azure/cognitive-services/language-service/overview\">https://learn.microsoft.com/azure/cognitive-services/language-service/overview</a>.0 + /// + public partial class AnalyzeDocumentsClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + 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 AnalyzeDocumentsClient for mocking. + protected AnalyzeDocumentsClient() + { + } + + /// Initializes a new instance of AnalyzeDocumentsClient. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AnalyzeDocumentsClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AnalyzeDocumentsClientOptions()) + { + } + + /// Initializes a new instance of AnalyzeDocumentsClient. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AnalyzeDocumentsClient(Uri endpoint, AzureKeyCredential credential, AnalyzeDocumentsClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AnalyzeDocumentsClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Get analysis status and results. + /// job ID. + /// (Optional) if set to true, response will contain request and document level statistics. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The cancellation token to use. + /// Get the status of a document analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. + /// + public virtual async Task> GetAnalyzeDocumentsJobStatusAsync(Guid jobId, bool? showStats = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAnalyzeDocumentsJobStatusAsync(jobId, showStats, top, skip, context).ConfigureAwait(false); + return Response.FromValue(AnalyzeDocumentsJobState.FromResponse(response), response); + } + + /// Get analysis status and results. + /// job ID. + /// (Optional) if set to true, response will contain request and document level statistics. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The cancellation token to use. + /// Get the status of a document analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. + /// + public virtual Response GetAnalyzeDocumentsJobStatus(Guid jobId, bool? showStats = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAnalyzeDocumentsJobStatus(jobId, showStats, top, skip, context); + return Response.FromValue(AnalyzeDocumentsJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get analysis status and results + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// job ID. + /// (Optional) if set to true, response will contain request and document level statistics. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetAnalyzeDocumentsJobStatusAsync(Guid jobId, bool? showStats, int? top, int? skip, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeDocumentsClient.GetAnalyzeDocumentsJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAnalyzeDocumentsJobStatusRequest(jobId, showStats, top, skip, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get analysis status and results + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// job ID. + /// (Optional) if set to true, response will contain request and document level statistics. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetAnalyzeDocumentsJobStatus(Guid jobId, bool? showStats, int? top, int? skip, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeDocumentsClient.GetAnalyzeDocumentsJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAnalyzeDocumentsJobStatusRequest(jobId, showStats, top, skip, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The input for the analyze documents operation. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task AnalyzeDocumentsSubmitOperationAsync(WaitUntil waitUntil, AnalyzeDocumentsOperationInput analyzeDocumentOperationInput, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(analyzeDocumentOperationInput, nameof(analyzeDocumentOperationInput)); + + using RequestContent content = analyzeDocumentOperationInput.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await AnalyzeDocumentsSubmitOperationAsync(waitUntil, content, context).ConfigureAwait(false); + } + + /// Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The input for the analyze documents operation. + /// The cancellation token to use. + /// is null. + /// + public virtual Operation AnalyzeDocumentsSubmitOperation(WaitUntil waitUntil, AnalyzeDocumentsOperationInput analyzeDocumentOperationInput, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(analyzeDocumentOperationInput, nameof(analyzeDocumentOperationInput)); + + using RequestContent content = analyzeDocumentOperationInput.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return AnalyzeDocumentsSubmitOperation(waitUntil, content, context); + } + + /// + /// [Protocol Method] Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content 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. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task AnalyzeDocumentsSubmitOperationAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeDocumentsClient.AnalyzeDocumentsSubmitOperation"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeDocumentsSubmitOperationRequest(content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeDocumentsClient.AnalyzeDocumentsSubmitOperation", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content 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. + /// is null. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation AnalyzeDocumentsSubmitOperation(WaitUntil waitUntil, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeDocumentsClient.AnalyzeDocumentsSubmitOperation"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeDocumentsSubmitOperationRequest(content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeDocumentsClient.AnalyzeDocumentsSubmitOperation", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Cancel a long-running Text Analysis job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The job ID to cancel. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual async Task AnalyzeDocumentsCancelOperationAsync(WaitUntil waitUntil, Guid jobId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeDocumentsClient.AnalyzeDocumentsCancelOperation"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeDocumentsCancelOperationRequest(jobId, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeDocumentsClient.AnalyzeDocumentsCancelOperation", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Cancel a long-running Text Analysis job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The job ID to cancel. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The representing an asynchronous operation on the service. + /// + public virtual Operation AnalyzeDocumentsCancelOperation(WaitUntil waitUntil, Guid jobId, RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeDocumentsClient.AnalyzeDocumentsCancelOperation"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeDocumentsCancelOperationRequest(jobId, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeDocumentsClient.AnalyzeDocumentsCancelOperation", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetAnalyzeDocumentsJobStatusRequest(Guid jobId, bool? showStats, int? top, int? skip, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/analyze-documents/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (showStats != null) + { + uri.AppendQuery("showStats", showStats.Value, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAnalyzeDocumentsSubmitOperationRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/analyze-documents/jobs", 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 CreateAnalyzeDocumentsCancelOperationRequest(Guid jobId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/analyze-documents/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath(":cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + 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 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsClientOptions.cs new file mode 100644 index 000000000000..e6adcfa53824 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + /// Client options for AnalyzeDocumentsClient. + public partial class AnalyzeDocumentsClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of AnalyzeDocumentsClientOptions. + public AnalyzeDocumentsClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.Serialization.cs similarity index 53% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.Serialization.cs index 3e92247d7a2d..9f401824408b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomHealthcareActionContent : IUtf8JsonSerializable, IJsonModel + public partial class AnalyzeDocumentsDocumentError : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,26 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (Optional.IsDefined(StringIndexType)) - { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); - } + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -65,19 +55,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AnalyzeDocumentsDocumentError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareActionContent(document.RootElement, options); + return DeserializeAnalyzeDocumentsDocumentError(document.RootElement, options); } - internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static AnalyzeDocumentsDocumentError DeserializeAnalyzeDocumentsDocumentError(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -85,40 +75,20 @@ internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionC { return null; } - bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; - StringIndexType? stringIndexType = default; + string id = default; + AnalyzeDocumentsError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("projectName"u8)) + if (property.NameEquals("id"u8)) { - projectName = property.Value.GetString(); + id = property.Value.GetString(); continue; } - if (property.NameEquals("deploymentName"u8)) + if (property.NameEquals("error"u8)) { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); + error = AnalyzeDocumentsError.DeserializeAnalyzeDocumentsError(property.Value, options); continue; } if (options.Format != "W") @@ -127,46 +97,46 @@ internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionC } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData); + return new AnalyzeDocumentsDocumentError(id, error, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support writing '{options.Format}' format."); } } - CustomHealthcareActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AnalyzeDocumentsDocumentError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareActionContent(document.RootElement, options); + return DeserializeAnalyzeDocumentsDocumentError(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsDocumentError)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomHealthcareActionContent FromResponse(Response response) + internal static AnalyzeDocumentsDocumentError FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareActionContent(document.RootElement); + return DeserializeAnalyzeDocumentsDocumentError(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.cs new file mode 100644 index 000000000000..6c42cc57b83c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsDocumentError.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.AI.Language.Documents +{ + /// Contains the error object with errors encountered for the processed document. + public partial class AnalyzeDocumentsDocumentError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Document Id. + /// Document Error. + /// or is null. + internal AnalyzeDocumentsDocumentError(string id, AnalyzeDocumentsError error) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(error, nameof(error)); + + Id = id; + Error = error; + } + + /// Initializes a new instance of . + /// Document Id. + /// Document Error. + /// Keeps track of any properties unknown to the library. + internal AnalyzeDocumentsDocumentError(string id, AnalyzeDocumentsError error, IDictionary serializedAdditionalRawData) + { + Id = id; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AnalyzeDocumentsDocumentError() + { + } + + /// Document Id. + public string Id { get; } + /// Document Error. + public AnalyzeDocumentsError Error { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsError.Serialization.cs new file mode 100644 index 000000000000..7f47915a9d5a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsError.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class AnalyzeDocumentsError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsError)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Innererror)) + { + writer.WritePropertyName("innererror"u8); + writer.WriteObjectValue(Innererror, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AnalyzeDocumentsError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAnalyzeDocumentsError(document.RootElement, options); + } + + internal static AnalyzeDocumentsError DeserializeAnalyzeDocumentsError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AnalyzeDocumentsErrorCode code = default; + string message = default; + string target = default; + IReadOnlyList details = default; + InnerErrorModel innererror = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = new AnalyzeDocumentsErrorCode(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeAnalyzeDocumentsError(item, options)); + } + details = array; + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = InnerErrorModel.DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AnalyzeDocumentsError( + code, + message, + target, + details ?? new ChangeTrackingList(), + innererror, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsError)} does not support writing '{options.Format}' format."); + } + } + + AnalyzeDocumentsError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAnalyzeDocumentsError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsError)} 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 AnalyzeDocumentsError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeDocumentsError(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsError.cs new file mode 100644 index 000000000000..c8a932636311 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsError.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.AI.Language.Documents +{ + /// The error response object returned when the service encounters some errors during processing the request. + public partial class AnalyzeDocumentsError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// is null. + internal AnalyzeDocumentsError(AnalyzeDocumentsErrorCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// The target of the error. + /// An array of details about specific errors that led to this reported error. + /// An object containing more specific information than the current object about the error. + /// Keeps track of any properties unknown to the library. + internal AnalyzeDocumentsError(AnalyzeDocumentsErrorCode code, string message, string target, IReadOnlyList details, InnerErrorModel innererror, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Target = target; + Details = details; + Innererror = innererror; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AnalyzeDocumentsError() + { + } + + /// One of a server-defined set of error codes. + public AnalyzeDocumentsErrorCode Code { get; } + /// A human-readable representation of the error. + public string Message { get; } + /// The target of the error. + public string Target { get; } + /// An array of details about specific errors that led to this reported error. + public IReadOnlyList Details { get; } + /// An object containing more specific information than the current object about the error. + public InnerErrorModel Innererror { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsErrorCode.cs new file mode 100644 index 000000000000..ea736ac120f8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsErrorCode.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// Human-readable error code. + public readonly partial struct AnalyzeDocumentsErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeDocumentsErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidRequestValue = "InvalidRequest"; + private const string InvalidArgumentValue = "InvalidArgument"; + private const string UnauthorizedValue = "Unauthorized"; + private const string ForbiddenValue = "Forbidden"; + private const string NotFoundValue = "NotFound"; + private const string ProjectNotFoundValue = "ProjectNotFound"; + private const string OperationNotFoundValue = "OperationNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchIndexNotFoundValue = "AzureCognitiveSearchIndexNotFound"; + private const string TooManyRequestsValue = "TooManyRequests"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string AzureCognitiveSearchIndexLimitReachedValue = "AzureCognitiveSearchIndexLimitReached"; + private const string InternalServerErrorValue = "InternalServerError"; + private const string ServiceUnavailableValue = "ServiceUnavailable"; + private const string TimeoutValue = "Timeout"; + private const string QuotaExceededValue = "QuotaExceeded"; + private const string ConflictValue = "Conflict"; + private const string WarningValue = "Warning"; + + /// Invalid request error. + public static AnalyzeDocumentsErrorCode InvalidRequest { get; } = new AnalyzeDocumentsErrorCode(InvalidRequestValue); + /// Invalid argument error. + public static AnalyzeDocumentsErrorCode InvalidArgument { get; } = new AnalyzeDocumentsErrorCode(InvalidArgumentValue); + /// Unauthorized access error. + public static AnalyzeDocumentsErrorCode Unauthorized { get; } = new AnalyzeDocumentsErrorCode(UnauthorizedValue); + /// Forbidden access error. + public static AnalyzeDocumentsErrorCode Forbidden { get; } = new AnalyzeDocumentsErrorCode(ForbiddenValue); + /// Not found error. + public static AnalyzeDocumentsErrorCode NotFound { get; } = new AnalyzeDocumentsErrorCode(NotFoundValue); + /// Project not found error. + public static AnalyzeDocumentsErrorCode ProjectNotFound { get; } = new AnalyzeDocumentsErrorCode(ProjectNotFoundValue); + /// Operation not found error. + public static AnalyzeDocumentsErrorCode OperationNotFound { get; } = new AnalyzeDocumentsErrorCode(OperationNotFoundValue); + /// Azure Cognitive Search not found error. + public static AnalyzeDocumentsErrorCode AzureCognitiveSearchNotFound { get; } = new AnalyzeDocumentsErrorCode(AzureCognitiveSearchNotFoundValue); + /// Azure Cognitive Search index not found error. + public static AnalyzeDocumentsErrorCode AzureCognitiveSearchIndexNotFound { get; } = new AnalyzeDocumentsErrorCode(AzureCognitiveSearchIndexNotFoundValue); + /// Too many requests error. + public static AnalyzeDocumentsErrorCode TooManyRequests { get; } = new AnalyzeDocumentsErrorCode(TooManyRequestsValue); + /// Azure Cognitive Search throttling error. + public static AnalyzeDocumentsErrorCode AzureCognitiveSearchThrottling { get; } = new AnalyzeDocumentsErrorCode(AzureCognitiveSearchThrottlingValue); + /// Azure Cognitive Search index limit reached error. + public static AnalyzeDocumentsErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new AnalyzeDocumentsErrorCode(AzureCognitiveSearchIndexLimitReachedValue); + /// Internal server error. + public static AnalyzeDocumentsErrorCode InternalServerError { get; } = new AnalyzeDocumentsErrorCode(InternalServerErrorValue); + /// Service unavailable error. + public static AnalyzeDocumentsErrorCode ServiceUnavailable { get; } = new AnalyzeDocumentsErrorCode(ServiceUnavailableValue); + /// Timeout error. + public static AnalyzeDocumentsErrorCode Timeout { get; } = new AnalyzeDocumentsErrorCode(TimeoutValue); + /// Quota exceeded error. + public static AnalyzeDocumentsErrorCode QuotaExceeded { get; } = new AnalyzeDocumentsErrorCode(QuotaExceededValue); + /// Conflict error. + public static AnalyzeDocumentsErrorCode Conflict { get; } = new AnalyzeDocumentsErrorCode(ConflictValue); + /// Warning error. + public static AnalyzeDocumentsErrorCode Warning { get; } = new AnalyzeDocumentsErrorCode(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeDocumentsErrorCode left, AnalyzeDocumentsErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeDocumentsErrorCode left, AnalyzeDocumentsErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeDocumentsErrorCode(string value) => new AnalyzeDocumentsErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeDocumentsErrorCode other && Equals(other); + /// + public bool Equals(AnalyzeDocumentsErrorCode 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsJobState.Serialization.cs new file mode 100644 index 000000000000..7bec2145e7b4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsJobState.Serialization.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class AnalyzeDocumentsJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsJobState)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedAt, "O"); + if (Optional.IsDefined(ExpiresOn)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpiresOn.Value, "O"); + } + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedAt, "O"); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + writer.WritePropertyName("tasks"u8); + writer.WriteObjectValue(Tasks, options); + if (Optional.IsDefined(Statistics)) + { + writer.WritePropertyName("statistics"u8); + writer.WriteObjectValue(Statistics, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AnalyzeDocumentsJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAnalyzeDocumentsJobState(document.RootElement, options); + } + + internal static AnalyzeDocumentsJobState DeserializeAnalyzeDocumentsJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset? expirationDateTime = default; + Guid jobId = default; + DateTimeOffset lastUpdatedDateTime = default; + DocumentActionState status = default; + IReadOnlyList errors = default; + string nextLink = default; + DocumentActions tasks = default; + RequestStatistics statistics = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("lastUpdatedDateTime"u8)) + { + lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new DocumentActionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AnalyzeDocumentsError.DeserializeAnalyzeDocumentsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("tasks"u8)) + { + tasks = DocumentActions.DeserializeDocumentActions(property.Value, options); + continue; + } + if (property.NameEquals("statistics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AnalyzeDocumentsJobState( + displayName, + createdDateTime, + expirationDateTime, + jobId, + lastUpdatedDateTime, + status, + errors ?? new ChangeTrackingList(), + nextLink, + tasks, + statistics, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsJobState)} does not support writing '{options.Format}' format."); + } + } + + AnalyzeDocumentsJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAnalyzeDocumentsJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsJobState)} 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 AnalyzeDocumentsJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeDocumentsJobState(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsJobState.cs new file mode 100644 index 000000000000..4663aea1aa4c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsJobState.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// The object containing the analyze job LRO job state. + public partial class AnalyzeDocumentsJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Date and time job created. + /// last updated date and time. + /// status. + /// List of tasks. + /// is null. + internal AnalyzeDocumentsJobState(DateTimeOffset createdAt, DateTimeOffset lastUpdatedAt, DocumentActionState status, DocumentActions tasks) + { + Argument.AssertNotNull(tasks, nameof(tasks)); + + CreatedAt = createdAt; + LastUpdatedAt = lastUpdatedAt; + Status = status; + Errors = new ChangeTrackingList(); + Tasks = tasks; + } + + /// Initializes a new instance of . + /// display name. + /// Date and time job created. + /// Date and time job expires. + /// job ID. + /// last updated date and time. + /// status. + /// errors. + /// next link. + /// List of tasks. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// Keeps track of any properties unknown to the library. + internal AnalyzeDocumentsJobState(string displayName, DateTimeOffset createdAt, DateTimeOffset? expiresOn, Guid jobId, DateTimeOffset lastUpdatedAt, DocumentActionState status, IReadOnlyList errors, string nextLink, DocumentActions tasks, RequestStatistics statistics, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + CreatedAt = createdAt; + ExpiresOn = expiresOn; + JobId = jobId; + LastUpdatedAt = lastUpdatedAt; + Status = status; + Errors = errors; + NextLink = nextLink; + Tasks = tasks; + Statistics = statistics; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AnalyzeDocumentsJobState() + { + } + + /// display name. + public string DisplayName { get; } + /// Date and time job created. + public DateTimeOffset CreatedAt { get; } + /// Date and time job expires. + public DateTimeOffset? ExpiresOn { get; } + /// job ID. + public Guid JobId { get; } + /// last updated date and time. + public DateTimeOffset LastUpdatedAt { get; } + /// status. + public DocumentActionState Status { get; } + /// errors. + public IReadOnlyList Errors { get; } + /// next link. + public string NextLink { get; } + /// List of tasks. + public DocumentActions Tasks { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public RequestStatistics Statistics { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsLROResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsLROResult.Serialization.cs new file mode 100644 index 000000000000..9a138fbf1af1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsLROResult.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + [PersistableModelProxy(typeof(UnknownAnalyzeDocumentsLROResult))] + public partial class AnalyzeDocumentsLROResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("lastUpdateDateTime"u8); + writer.WriteStringValue(LastUpdateDateTime, "O"); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(TaskName)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(TaskName); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AnalyzeDocumentsLROResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAnalyzeDocumentsLROResult(document.RootElement, options); + } + + internal static AnalyzeDocumentsLROResult DeserializeAnalyzeDocumentsLROResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AbstractiveSummarizationLROResults": return AbstractiveSummarizationOperationResult.DeserializeAbstractiveSummarizationOperationResult(element, options); + case "ExtractiveSummarizationLROResults": return ExtractiveSummarizationOperationResult.DeserializeExtractiveSummarizationOperationResult(element, options); + case "PiiEntityRecognitionLROResults": return PiiEntityRecognitionOperationResult.DeserializePiiEntityRecognitionOperationResult(element, options); + } + } + return UnknownAnalyzeDocumentsLROResult.DeserializeUnknownAnalyzeDocumentsLROResult(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support writing '{options.Format}' format."); + } + } + + AnalyzeDocumentsLROResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAnalyzeDocumentsLROResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} 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 AnalyzeDocumentsLROResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeDocumentsLROResult(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsLROResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsLROResult.cs new file mode 100644 index 000000000000..774a66e4f455 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsLROResult.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// + /// Contains the AnalyzeDocuments long running operation result object. + /// 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 AnalyzeDocumentsLROResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + protected AnalyzeDocumentsLROResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status) + { + LastUpdateDateTime = lastUpdateDateTime; + Status = status; + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Keeps track of any properties unknown to the library. + internal AnalyzeDocumentsLROResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, string taskName, AnalyzeDocumentsOperationResultsKind kind, IDictionary serializedAdditionalRawData) + { + LastUpdateDateTime = lastUpdateDateTime; + Status = status; + TaskName = taskName; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AnalyzeDocumentsLROResult() + { + } + + /// The last updated time in UTC for the task. + public DateTimeOffset LastUpdateDateTime { get; } + /// The status of the task at the mentioned last update time. + public DocumentActionState Status { get; } + /// task name. + public string TaskName { get; } + /// Kind of the task. + internal AnalyzeDocumentsOperationResultsKind Kind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationAction.Serialization.cs new file mode 100644 index 000000000000..0a101869498a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationAction.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + [PersistableModelProxy(typeof(UnknownAnalyzeDocumentsOperationAction))] + public partial class AnalyzeDocumentsOperationAction : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AnalyzeDocumentsOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAnalyzeDocumentsOperationAction(document.RootElement, options); + } + + internal static AnalyzeDocumentsOperationAction DeserializeAnalyzeDocumentsOperationAction(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AbstractiveSummarization": return AbstractiveSummarizationOperationAction.DeserializeAbstractiveSummarizationOperationAction(element, options); + case "ExtractiveSummarization": return ExtractiveSummarizationOperationAction.DeserializeExtractiveSummarizationOperationAction(element, options); + case "PiiEntityRecognition": return PiiLROTask.DeserializePiiLROTask(element, options); + } + } + return UnknownAnalyzeDocumentsOperationAction.DeserializeUnknownAnalyzeDocumentsOperationAction(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support writing '{options.Format}' format."); + } + } + + AnalyzeDocumentsOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAnalyzeDocumentsOperationAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} 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 AnalyzeDocumentsOperationAction FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeDocumentsOperationAction(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationAction.cs new file mode 100644 index 000000000000..b7d8e0caf4c1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationAction.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.AI.Language.Documents +{ + /// + /// The long running task to be performed by the service on the input documents. + /// 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 AnalyzeDocumentsOperationAction + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AnalyzeDocumentsOperationAction() + { + } + + /// Initializes a new instance of . + /// task name. + /// The kind of task to perform. + /// Keeps track of any properties unknown to the library. + internal AnalyzeDocumentsOperationAction(string name, AnalyzeDocumentsOperationActionKind kind, IDictionary serializedAdditionalRawData) + { + Name = name; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// task name. + public string Name { get; set; } + /// The kind of task to perform. + internal AnalyzeDocumentsOperationActionKind Kind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationActionKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationActionKind.cs new file mode 100644 index 000000000000..6595b48120dd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationActionKind.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.AI.Language.Documents +{ + /// The kind of the long running analyze documents tasks supported. + internal readonly partial struct AnalyzeDocumentsOperationActionKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeDocumentsOperationActionKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PiiEntityRecognitionValue = "PiiEntityRecognition"; + private const string ExtractiveSummarizationValue = "ExtractiveSummarization"; + private const string AbstractiveSummarizationValue = "AbstractiveSummarization"; + + /// PII entity recognition task. + public static AnalyzeDocumentsOperationActionKind PiiEntityRecognition { get; } = new AnalyzeDocumentsOperationActionKind(PiiEntityRecognitionValue); + /// Extractive summarization task. + public static AnalyzeDocumentsOperationActionKind ExtractiveSummarization { get; } = new AnalyzeDocumentsOperationActionKind(ExtractiveSummarizationValue); + /// Abstractive summarization task. + public static AnalyzeDocumentsOperationActionKind AbstractiveSummarization { get; } = new AnalyzeDocumentsOperationActionKind(AbstractiveSummarizationValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeDocumentsOperationActionKind left, AnalyzeDocumentsOperationActionKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeDocumentsOperationActionKind left, AnalyzeDocumentsOperationActionKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeDocumentsOperationActionKind(string value) => new AnalyzeDocumentsOperationActionKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeDocumentsOperationActionKind other && Equals(other); + /// + public bool Equals(AnalyzeDocumentsOperationActionKind 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationInput.Serialization.cs new file mode 100644 index 000000000000..7396f31afdf9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationInput.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.AI.Language.Documents +{ + public partial class AnalyzeDocumentsOperationInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationInput)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WritePropertyName("analysisInput"u8); + writer.WriteObjectValue(DocumentsInput, options); + writer.WritePropertyName("tasks"u8); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(DefaultLanguage)) + { + writer.WritePropertyName("defaultLanguage"u8); + writer.WriteStringValue(DefaultLanguage); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AnalyzeDocumentsOperationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAnalyzeDocumentsOperationInput(document.RootElement, options); + } + + internal static AnalyzeDocumentsOperationInput DeserializeAnalyzeDocumentsOperationInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + MultiLanguageDocumentInput analysisInput = default; + IList tasks = default; + string defaultLanguage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("analysisInput"u8)) + { + analysisInput = MultiLanguageDocumentInput.DeserializeMultiLanguageDocumentInput(property.Value, options); + continue; + } + if (property.NameEquals("tasks"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AnalyzeDocumentsOperationAction.DeserializeAnalyzeDocumentsOperationAction(item, options)); + } + tasks = array; + continue; + } + if (property.NameEquals("defaultLanguage"u8)) + { + defaultLanguage = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AnalyzeDocumentsOperationInput(displayName, analysisInput, tasks, defaultLanguage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationInput)} does not support writing '{options.Format}' format."); + } + } + + AnalyzeDocumentsOperationInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAnalyzeDocumentsOperationInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationInput)} 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 AnalyzeDocumentsOperationInput FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeDocumentsOperationInput(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationInput.cs new file mode 100644 index 000000000000..d4464d73ce72 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationInput.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Documents +{ + /// The input object for the analyze documents LRO. + public partial class AnalyzeDocumentsOperationInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Contains the input to be analyzed. + /// + /// List of tasks to be performed as part of the LRO. + /// 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 AnalyzeDocumentsOperationInput(MultiLanguageDocumentInput documentsInput, IEnumerable actions) + { + Argument.AssertNotNull(documentsInput, nameof(documentsInput)); + Argument.AssertNotNull(actions, nameof(actions)); + + DocumentsInput = documentsInput; + Actions = actions.ToList(); + } + + /// Initializes a new instance of . + /// Name for the task. + /// Contains the input to be analyzed. + /// + /// List of tasks to be performed as part of the LRO. + /// 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 . + /// + /// Default language to use for records. + /// Keeps track of any properties unknown to the library. + internal AnalyzeDocumentsOperationInput(string displayName, MultiLanguageDocumentInput documentsInput, IList actions, string defaultLanguage, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + DocumentsInput = documentsInput; + Actions = actions; + DefaultLanguage = defaultLanguage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AnalyzeDocumentsOperationInput() + { + } + + /// Name for the task. + public string DisplayName { get; set; } + /// Contains the input to be analyzed. + public MultiLanguageDocumentInput DocumentsInput { get; } + /// + /// List of tasks to be performed as part of the LRO. + /// 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 Actions { get; } + /// Default language to use for records. + public string DefaultLanguage { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationResultsKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationResultsKind.cs new file mode 100644 index 000000000000..d4120af3f15f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsOperationResultsKind.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.AI.Language.Documents +{ + /// The kind of the response object returned by the analyze-documents long running task. + internal readonly partial struct AnalyzeDocumentsOperationResultsKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeDocumentsOperationResultsKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PiiEntityRecognitionOperationResultsValue = "PiiEntityRecognitionLROResults"; + private const string ExtractiveSummarizationOperationResultsValue = "ExtractiveSummarizationLROResults"; + private const string AbstractiveSummarizationOperationResultsValue = "AbstractiveSummarizationLROResults"; + + /// PII entity recognition LRO results. + public static AnalyzeDocumentsOperationResultsKind PiiEntityRecognitionOperationResults { get; } = new AnalyzeDocumentsOperationResultsKind(PiiEntityRecognitionOperationResultsValue); + /// Extractive summarization LRO results. + public static AnalyzeDocumentsOperationResultsKind ExtractiveSummarizationOperationResults { get; } = new AnalyzeDocumentsOperationResultsKind(ExtractiveSummarizationOperationResultsValue); + /// Abstractive summarization LRO results. + public static AnalyzeDocumentsOperationResultsKind AbstractiveSummarizationOperationResults { get; } = new AnalyzeDocumentsOperationResultsKind(AbstractiveSummarizationOperationResultsValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeDocumentsOperationResultsKind left, AnalyzeDocumentsOperationResultsKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeDocumentsOperationResultsKind left, AnalyzeDocumentsOperationResultsKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeDocumentsOperationResultsKind(string value) => new AnalyzeDocumentsOperationResultsKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeDocumentsOperationResultsKind other && Equals(other); + /// + public bool Equals(AnalyzeDocumentsOperationResultsKind 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsResult.Serialization.cs similarity index 66% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsResult.Serialization.cs index 141af207a73a..d264e77f3bdd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomHealthcareResult : IUtf8JsonSerializable, IJsonModel + public partial class AnalyzeDocumentsResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -46,10 +46,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("statistics"u8); writer.WriteObjectValue(Statistics, options); } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); writer.WritePropertyName("documents"u8); writer.WriteStartArray(); foreach (var item in Documents) @@ -74,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AnalyzeDocumentsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareResult(document.RootElement, options); + return DeserializeAnalyzeDocumentsResult(document.RootElement, options); } - internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static AnalyzeDocumentsResult DeserializeAnalyzeDocumentsResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -94,21 +92,20 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle { return null; } - IReadOnlyList errors = default; + IReadOnlyList errors = default; RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; - IReadOnlyList documents = default; + string modelVersion = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("errors"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DocumentError.DeserializeDocumentError(item, options)); + array.Add(AnalyzeDocumentsDocumentError.DeserializeAnalyzeDocumentsDocumentError(item, options)); } errors = array; continue; @@ -122,22 +119,17 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); continue; } - if (property.NameEquals("projectName"u8)) + if (property.NameEquals("modelVersion"u8)) { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); + modelVersion = property.Value.GetString(); continue; } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CustomHealthcareActionResult.DeserializeCustomHealthcareActionResult(item, options)); + array.Add(DocumentAnalysisDocumentResult.DeserializeDocumentAnalysisDocumentResult(item, options)); } documents = array; continue; @@ -148,52 +140,46 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareResult( - errors, - statistics, - projectName, - deploymentName, - documents, - serializedAdditionalRawData); + return new AnalyzeDocumentsResult(errors, statistics, modelVersion, documents, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsResult)} does not support writing '{options.Format}' format."); } } - CustomHealthcareResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AnalyzeDocumentsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareResult(document.RootElement, options); + return DeserializeAnalyzeDocumentsResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomHealthcareResult FromResponse(Response response) + internal static AnalyzeDocumentsResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareResult(document.RootElement); + return DeserializeAnalyzeDocumentsResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsResult.cs similarity index 52% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsResult.cs index e79fcfece476..cbc07172d3b7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AnalyzeDocumentsResult.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - /// Contains the custom healthcare result for the request. - public partial class CustomHealthcareResult + /// Contains the result object for the processed document. + public partial class AnalyzeDocumentsResult { /// /// Keeps track of any properties unknown to the library. @@ -46,56 +46,49 @@ public partial class CustomHealthcareResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// List of custom healthcare results for the document. - /// , , or is null. - internal CustomHealthcareResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) + /// This field indicates which model is used for analysis. + /// Response by document. + /// , or is null. + internal AnalyzeDocumentsResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; + ModelVersion = modelVersion; Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// List of custom healthcare results for the document. + /// This field indicates which model is used for analysis. + /// Response by document. /// Keeps track of any properties unknown to the library. - internal CustomHealthcareResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal AnalyzeDocumentsResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; + ModelVersion = modelVersion; Documents = documents; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomHealthcareResult() + /// Initializes a new instance of for deserialization. + internal AnalyzeDocumentsResult() { } /// Errors by document id. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { get; } /// if showStats=true was specified in the request this field will contain information about the request payload. public RequestStatistics Statistics { get; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// List of custom healthcare results for the document. - public IReadOnlyList Documents { get; } + /// This field indicates which model is used for analysis. + public string ModelVersion { get; } + /// Response by document. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AzureBlobDocumentLocation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AzureBlobDocumentLocation.Serialization.cs new file mode 100644 index 000000000000..6c86a6e6f452 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AzureBlobDocumentLocation.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class AzureBlobDocumentLocation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(AzureBlobDocumentLocation)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (Optional.IsDefined(ManagedIdentityClientId)) + { + writer.WritePropertyName("managedIdentityClientId"u8); + writer.WriteStringValue(ManagedIdentityClientId); + } + } + + AzureBlobDocumentLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureBlobDocumentLocation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureBlobDocumentLocation(document.RootElement, options); + } + + internal static AzureBlobDocumentLocation DeserializeAzureBlobDocumentLocation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string location = default; + string managedIdentityClientId = default; + DocumentLocationKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("managedIdentityClientId"u8)) + { + managedIdentityClientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new DocumentLocationKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureBlobDocumentLocation(kind, serializedAdditionalRawData, location, managedIdentityClientId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureBlobDocumentLocation)} does not support writing '{options.Format}' format."); + } + } + + AzureBlobDocumentLocation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAzureBlobDocumentLocation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureBlobDocumentLocation)} 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 new AzureBlobDocumentLocation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAzureBlobDocumentLocation(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AzureBlobDocumentLocation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AzureBlobDocumentLocation.cs new file mode 100644 index 000000000000..9ee79f9f2655 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/AzureBlobDocumentLocation.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Document location for azure blobs. + public partial class AzureBlobDocumentLocation : DocumentLocation + { + /// Initializes a new instance of . + /// The location of the document. + /// is null. + public AzureBlobDocumentLocation(string location) + { + Argument.AssertNotNull(location, nameof(location)); + + Kind = DocumentLocationKind.AzureBlob; + Location = location; + } + + /// Initializes a new instance of . + /// The kind of the document location. + /// Keeps track of any properties unknown to the library. + /// The location of the document. + /// The user managed identity client Id to use to authenticate with the storage account. + internal AzureBlobDocumentLocation(DocumentLocationKind kind, IDictionary serializedAdditionalRawData, string location, string managedIdentityClientId) : base(kind, serializedAdditionalRawData) + { + Location = location; + ManagedIdentityClientId = managedIdentityClientId; + } + + /// Initializes a new instance of for deserialization. + internal AzureBlobDocumentLocation() + { + } + + /// The location of the document. + public string Location { get; set; } + /// The user managed identity client Id to use to authenticate with the storage account. + public string ManagedIdentityClientId { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/BaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/BaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..5e6def2d4800 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/BaseRedactionPolicy.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + [PersistableModelProxy(typeof(UnknownBaseRedactionPolicy))] + public partial class BaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static BaseRedactionPolicy DeserializeBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("policyKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "characterMask": return CharacterMaskPolicy.DeserializeCharacterMaskPolicy(element, options); + case "entityMask": return EntityMaskPolicy.DeserializeEntityMaskPolicy(element, options); + case "noMask": return NoMaskPolicy.DeserializeNoMaskPolicy(element, options); + } + } + return UnknownBaseRedactionPolicy.DeserializeUnknownBaseRedactionPolicy(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 BaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBaseRedactionPolicy(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/BaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/BaseRedactionPolicy.cs new file mode 100644 index 000000000000..c2b8dc2e58bf --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/BaseRedactionPolicy.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.AI.Language.Documents +{ + /// + /// The abstract base class for RedactionPolicy. + /// 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 BaseRedactionPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected BaseRedactionPolicy() + { + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal BaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) + { + PolicyKind = policyKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity RedactionPolicy object kind. + internal RedactionPolicyKind PolicyKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/CharacterMaskPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/CharacterMaskPolicy.Serialization.cs new file mode 100644 index 000000000000..33c80de49682 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/CharacterMaskPolicy.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.AI.Language.Documents +{ + public partial class CharacterMaskPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CharacterMaskPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RedactionCharacter)) + { + writer.WritePropertyName("redactionCharacter"u8); + writer.WriteStringValue(RedactionCharacter.Value.ToString()); + } + } + + CharacterMaskPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CharacterMaskPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCharacterMaskPolicy(document.RootElement, options); + } + + internal static CharacterMaskPolicy DeserializeCharacterMaskPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionCharacter? redactionCharacter = default; + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redactionCharacter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionCharacter = new RedactionCharacter(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CharacterMaskPolicy(policyKind, serializedAdditionalRawData, redactionCharacter); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicy)} does not support writing '{options.Format}' format."); + } + } + + CharacterMaskPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCharacterMaskPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicy)} 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 new CharacterMaskPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCharacterMaskPolicy(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/CharacterMaskPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/CharacterMaskPolicy.cs new file mode 100644 index 000000000000..76236702aea5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/CharacterMaskPolicy.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Represents the policy of redacting with a redaction character. + public partial class CharacterMaskPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + public CharacterMaskPolicy() + { + PolicyKind = RedactionPolicyKind.CharacterMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + internal CharacterMaskPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData, RedactionCharacter? redactionCharacter) : base(policyKind, serializedAdditionalRawData) + { + RedactionCharacter = redactionCharacter; + } + + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + public RedactionCharacter? RedactionCharacter { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DetectedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DetectedLanguage.Serialization.cs new file mode 100644 index 000000000000..2eab1ea5d482 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DetectedLanguage.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.AI.Language.Documents +{ + public partial class DetectedLanguage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DetectedLanguage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("iso6391Name"u8); + writer.WriteStringValue(Iso6391Name); + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(ConfidenceScore); + if (Optional.IsDefined(Script)) + { + writer.WritePropertyName("script"u8); + writer.WriteStringValue(Script.Value.ToString()); + } + if (Optional.IsDefined(ScriptCode)) + { + writer.WritePropertyName("scriptCode"u8); + writer.WriteStringValue(ScriptCode.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DetectedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DetectedLanguage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDetectedLanguage(document.RootElement, options); + } + + internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string iso6391Name = default; + double confidenceScore = default; + ScriptKind? script = default; + ScriptCode? scriptCode = 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("iso6391Name"u8)) + { + iso6391Name = property.Value.GetString(); + continue; + } + if (property.NameEquals("confidenceScore"u8)) + { + confidenceScore = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("script"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + script = new ScriptKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("scriptCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scriptCode = new ScriptCode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DetectedLanguage( + name, + iso6391Name, + confidenceScore, + script, + scriptCode, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DetectedLanguage)} does not support writing '{options.Format}' format."); + } + } + + DetectedLanguage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDetectedLanguage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DetectedLanguage)} 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 DetectedLanguage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDetectedLanguage(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DetectedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DetectedLanguage.cs new file mode 100644 index 000000000000..f72cde25018e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DetectedLanguage.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Contains the details of the detected language for the text. + public partial class DetectedLanguage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Long name of a detected language (e.g. English, French). + /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). + /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. + /// or is null. + internal DetectedLanguage(string name, string iso6391Name, double confidenceScore) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(iso6391Name, nameof(iso6391Name)); + + Name = name; + Iso6391Name = iso6391Name; + ConfidenceScore = confidenceScore; + } + + /// Initializes a new instance of . + /// Long name of a detected language (e.g. English, French). + /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). + /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. + /// Identifies the script of the input document. + /// Identifies the script of the input document. + /// Keeps track of any properties unknown to the library. + internal DetectedLanguage(string name, string iso6391Name, double confidenceScore, ScriptKind? script, ScriptCode? scriptCode, IDictionary serializedAdditionalRawData) + { + Name = name; + Iso6391Name = iso6391Name; + ConfidenceScore = confidenceScore; + Script = script; + ScriptCode = scriptCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DetectedLanguage() + { + } + + /// Long name of a detected language (e.g. English, French). + public string Name { get; } + /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). + public string Iso6391Name { get; } + /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. + public double ConfidenceScore { get; } + /// Identifies the script of the input document. + public ScriptKind? Script { get; } + /// Identifies the script of the input document. + public ScriptCode? ScriptCode { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Docs/AnalyzeDocumentsClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Docs/AnalyzeDocumentsClient.xml new file mode 100644 index 000000000000..6d93a1777168 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Docs/AnalyzeDocumentsClient.xml @@ -0,0 +1,267 @@ + + + + + +This sample shows how to call GetAnalyzeDocumentsJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +Response response = await client.GetAnalyzeDocumentsJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> + + + +This sample shows how to call GetAnalyzeDocumentsJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +Response response = client.GetAnalyzeDocumentsJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> + + + +This sample shows how to call GetAnalyzeDocumentsJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +Response response = await client.GetAnalyzeDocumentsJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call GetAnalyzeDocumentsJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +Response response = client.GetAnalyzeDocumentsJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); +Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call AnalyzeDocumentsSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +AnalyzeDocumentsOperationInput analyzeDocumentOperationInput = new AnalyzeDocumentsOperationInput(new MultiLanguageDocumentInput +{ + Documents = {new MultiLanguageInput("1", new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container/document.txt"), new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container")) + { + Language = "en", + }}, +}, new AnalyzeDocumentsOperationAction[] +{ + new PiiLROTask + { + Parameters = new PiiActionContent + { + PiiCategories = {PiiCategory.Person, PiiCategory.Organization}, + RedactionPolicy = new EntityMaskPolicy(), + }, + Name = "Redact PII Task 1", + } +}) +{ + DisplayName = "Redact PII from documents example", +}; +Operation operation = await client.AnalyzeDocumentsSubmitOperationAsync(WaitUntil.Completed, analyzeDocumentOperationInput); +]]> + + + +This sample shows how to call AnalyzeDocumentsSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +AnalyzeDocumentsOperationInput analyzeDocumentOperationInput = new AnalyzeDocumentsOperationInput(new MultiLanguageDocumentInput +{ + Documents = {new MultiLanguageInput("1", new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container/document.txt"), new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container")) + { + Language = "en", + }}, +}, new AnalyzeDocumentsOperationAction[] +{ + new PiiLROTask + { + Parameters = new PiiActionContent + { + PiiCategories = {PiiCategory.Person, PiiCategory.Organization}, + RedactionPolicy = new EntityMaskPolicy(), + }, + Name = "Redact PII Task 1", + } +}) +{ + DisplayName = "Redact PII from documents example", +}; +Operation operation = client.AnalyzeDocumentsSubmitOperation(WaitUntil.Completed, analyzeDocumentOperationInput); +]]> + + + +This sample shows how to call AnalyzeDocumentsSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redact PII from documents example", + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + source = new + { + location = "https://myblob.blob.core.windows.net/Container/document.txt", + kind = "AzureBlob", + }, + target = new + { + location = "https://myblob.blob.core.windows.net/Container", + kind = "AzureBlob", + }, + } + }, + }, + tasks = new object[] + { + new + { + kind = "PiiEntityRecognition", + taskName = "Redact PII Task 1", + parameters = new + { + redactionPolicy = new + { + policyKind = "entityMask", + }, + piiCategories = new object[] + { + "Person", + "Organization" + }, + }, + } + }, +}); +Operation operation = await client.AnalyzeDocumentsSubmitOperationAsync(WaitUntil.Completed, content); +]]> + + + +This sample shows how to call AnalyzeDocumentsSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redact PII from documents example", + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + source = new + { + location = "https://myblob.blob.core.windows.net/Container/document.txt", + kind = "AzureBlob", + }, + target = new + { + location = "https://myblob.blob.core.windows.net/Container", + kind = "AzureBlob", + }, + } + }, + }, + tasks = new object[] + { + new + { + kind = "PiiEntityRecognition", + taskName = "Redact PII Task 1", + parameters = new + { + redactionPolicy = new + { + policyKind = "entityMask", + }, + piiCategories = new object[] + { + "Person", + "Organization" + }, + }, + } + }, +}); +Operation operation = client.AnalyzeDocumentsSubmitOperation(WaitUntil.Completed, content); +]]> + + + +This sample shows how to call AnalyzeDocumentsCancelOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +Operation operation = await client.AnalyzeDocumentsCancelOperationAsync(WaitUntil.Completed, Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> + + + +This sample shows how to call AnalyzeDocumentsCancelOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + +Operation operation = client.AnalyzeDocumentsCancelOperation(WaitUntil.Completed, Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActionState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActionState.cs new file mode 100644 index 000000000000..1babaa6d7697 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActionState.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.AI.Language.Documents +{ + /// The status of the task at the mentioned last update time. + public readonly partial struct DocumentActionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentActionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "notStarted"; + private const string RunningValue = "running"; + private const string SucceededValue = "succeeded"; + private const string PartiallyCompletedValue = "partiallyCompleted"; + private const string FailedValue = "failed"; + private const string CancelledValue = "cancelled"; + private const string CancellingValue = "cancelling"; + + /// Not started status. + public static DocumentActionState NotStarted { get; } = new DocumentActionState(NotStartedValue); + /// Running status. + public static DocumentActionState Running { get; } = new DocumentActionState(RunningValue); + /// Succeeded status. + public static DocumentActionState Succeeded { get; } = new DocumentActionState(SucceededValue); + /// Partially completed status. + public static DocumentActionState PartiallyCompleted { get; } = new DocumentActionState(PartiallyCompletedValue); + /// Failed status. + public static DocumentActionState Failed { get; } = new DocumentActionState(FailedValue); + /// Cancelled status. + public static DocumentActionState Cancelled { get; } = new DocumentActionState(CancelledValue); + /// Cancelling status. + public static DocumentActionState Cancelling { get; } = new DocumentActionState(CancellingValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentActionState left, DocumentActionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentActionState left, DocumentActionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentActionState(string value) => new DocumentActionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentActionState other && Equals(other); + /// + public bool Equals(DocumentActionState 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActions.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActions.Serialization.cs new file mode 100644 index 000000000000..8271d2f2155a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActions.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class DocumentActions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentActions)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); + writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); + writer.WritePropertyName("inProgress"u8); + writer.WriteNumberValue(InProgress); + writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); + if (Optional.IsCollectionDefined(Items)) + { + writer.WritePropertyName("items"u8); + writer.WriteStartArray(); + foreach (var item in Items) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentActions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentActions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentActions(document.RootElement, options); + } + + internal static DocumentActions DeserializeDocumentActions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int completed = default; + int failed = default; + int inProgress = default; + int total = default; + IReadOnlyList items = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("completed"u8)) + { + completed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("failed"u8)) + { + failed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("inProgress"u8)) + { + inProgress = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("total"u8)) + { + total = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("items"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AnalyzeDocumentsLROResult.DeserializeAnalyzeDocumentsLROResult(item, options)); + } + items = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentActions( + completed, + failed, + inProgress, + total, + items ?? 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(DocumentActions)} does not support writing '{options.Format}' format."); + } + } + + DocumentActions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentActions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentActions)} 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 DocumentActions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentActions(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActions.cs new file mode 100644 index 000000000000..39e2c9f8cca6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentActions.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Container for the tasks status for the LRO job. + public partial class DocumentActions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Count of completed tasks. + /// Count of failed tasks. + /// Count of inprogress tasks. + /// Count of total tasks. + internal DocumentActions(int completed, int failed, int inProgress, int total) + { + Completed = completed; + Failed = failed; + InProgress = inProgress; + Total = total; + Items = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Count of completed tasks. + /// Count of failed tasks. + /// Count of inprogress tasks. + /// Count of total tasks. + /// + /// Enumerable of Analyze documents job results. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal DocumentActions(int completed, int failed, int inProgress, int total, IReadOnlyList items, IDictionary serializedAdditionalRawData) + { + Completed = completed; + Failed = failed; + InProgress = inProgress; + Total = total; + Items = items; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentActions() + { + } + + /// Count of completed tasks. + public int Completed { get; } + /// Count of failed tasks. + public int Failed { get; } + /// Count of inprogress tasks. + public int InProgress { get; } + /// Count of total tasks. + public int Total { get; } + /// + /// Enumerable of Analyze documents job results. + /// 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 Items { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentAnalysisDocumentResult.Serialization.cs similarity index 56% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentAnalysisDocumentResult.Serialization.cs index 26e1d09c569c..0ef238fa45ca 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentAnalysisDocumentResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomSentimentAnalysisResultDocument : IUtf8JsonSerializable, IJsonModel + public partial class DocumentAnalysisDocumentResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writ /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DocumentAnalysisDocumentResult)} does not support writing '{format}' format."); } writer.WritePropertyName("id"u8); @@ -48,22 +48,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("statistics"u8); writer.WriteObjectValue(Statistics, options); } - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment.ToSerialString()); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores, options); - writer.WritePropertyName("sentences"u8); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source, options); + writer.WritePropertyName("target"u8); writer.WriteStartArray(); - foreach (var item in Sentences) + foreach (var item in Target) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (Optional.IsDefined(DetectedLanguage)) - { - writer.WritePropertyName("detectedLanguage"u8); - writer.WriteObjectValue(DetectedLanguage, options); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -81,19 +74,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomSentimentAnalysisResultDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DocumentAnalysisDocumentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DocumentAnalysisDocumentResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisResultDocument(document.RootElement, options); + return DeserializeDocumentAnalysisDocumentResult(document.RootElement, options); } - internal static CustomSentimentAnalysisResultDocument DeserializeCustomSentimentAnalysisResultDocument(JsonElement element, ModelReaderWriterOptions options = null) + internal static DocumentAnalysisDocumentResult DeserializeDocumentAnalysisDocumentResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -104,10 +97,8 @@ internal static CustomSentimentAnalysisResultDocument DeserializeCustomSentiment string id = default; IReadOnlyList warnings = default; DocumentStatistics statistics = default; - DocumentSentiment sentiment = default; - SentimentConfidenceScores confidenceScores = default; - IReadOnlyList sentences = default; - DetectedLanguage detectedLanguage = default; + DocumentLocation source = default; + IReadOnlyList target = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -136,33 +127,19 @@ internal static CustomSentimentAnalysisResultDocument DeserializeCustomSentiment statistics = DocumentStatistics.DeserializeDocumentStatistics(property.Value, options); continue; } - if (property.NameEquals("sentiment"u8)) - { - sentiment = property.Value.GetString().ToDocumentSentiment(); - continue; - } - if (property.NameEquals("confidenceScores"u8)) + if (property.NameEquals("source"u8)) { - confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value, options); + source = DocumentLocation.DeserializeDocumentLocation(property.Value, options); continue; } - if (property.NameEquals("sentences"u8)) + if (property.NameEquals("target"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CustomSentenceSentiment.DeserializeCustomSentenceSentiment(item, options)); - } - sentences = array; - continue; - } - if (property.NameEquals("detectedLanguage"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; + array.Add(DocumentLocation.DeserializeDocumentLocation(item, options)); } - detectedLanguage = DetectedLanguage.DeserializeDetectedLanguage(property.Value, options); + target = array; continue; } if (options.Format != "W") @@ -171,54 +148,52 @@ internal static CustomSentimentAnalysisResultDocument DeserializeCustomSentiment } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisResultDocument( + return new DocumentAnalysisDocumentResult( id, warnings, statistics, - sentiment, - confidenceScores, - sentences, - detectedLanguage, + source, + target, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentAnalysisDocumentResult)} does not support writing '{options.Format}' format."); } } - CustomSentimentAnalysisResultDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DocumentAnalysisDocumentResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisResultDocument(document.RootElement, options); + return DeserializeDocumentAnalysisDocumentResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentAnalysisDocumentResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomSentimentAnalysisResultDocument FromResponse(Response response) + internal static DocumentAnalysisDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisResultDocument(document.RootElement); + return DeserializeDocumentAnalysisDocumentResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentAnalysisDocumentResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentAnalysisDocumentResult.cs new file mode 100644 index 000000000000..36ea33e30b68 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentAnalysisDocumentResult.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Documents +{ + /// Contains the result object for the processed document. + public partial class DocumentAnalysisDocumentResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Unique, non-empty document identifier. + /// Warnings encountered while processing document. + /// + /// Location of the input document. + /// 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 . + /// + /// + /// Array of document results generated after the analysis. + /// 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. + internal DocumentAnalysisDocumentResult(string id, IEnumerable warnings, DocumentLocation source, IEnumerable target) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(warnings, nameof(warnings)); + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(target, nameof(target)); + + Id = id; + Warnings = warnings.ToList(); + Source = source; + Target = target.ToList(); + } + + /// Initializes a new instance of . + /// Unique, non-empty document identifier. + /// Warnings encountered while processing document. + /// if showStats=true was specified in the request this field will contain information about the document payload. + /// + /// Location of the input document. + /// 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 . + /// + /// + /// Array of document results generated after the analysis. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Keeps track of any properties unknown to the library. + internal DocumentAnalysisDocumentResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, DocumentLocation source, IReadOnlyList target, IDictionary serializedAdditionalRawData) + { + Id = id; + Warnings = warnings; + Statistics = statistics; + Source = source; + Target = target; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentAnalysisDocumentResult() + { + } + + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public DocumentStatistics Statistics { get; } + /// + /// Location of the input document. + /// 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 DocumentLocation Source { get; } + /// + /// Array of document results generated after the analysis. + /// 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 Target { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.Serialization.cs similarity index 56% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.Serialization.cs index ee0ac06a51de..285ddc4aa118 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class ListComponent : IUtf8JsonSerializable, IJsonModel + public partial class DocumentError : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -26,35 +26,48 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt /// The JSON writer. /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ListComponent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DocumentError)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } } - ListComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DocumentError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ListComponent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DocumentError)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeListComponent(document.RootElement, options); + return DeserializeDocumentError(document.RootElement, options); } - internal static ListComponent DeserializeListComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static DocumentError DeserializeDocumentError(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +75,20 @@ internal static ListComponent DeserializeListComponent(JsonElement element, Mode { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + string id = default; + AnalyzeDocumentsError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (property.NameEquals("id"u8)) { - value = property.Value.GetString(); + id = property.Value.GetString(); continue; } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("error"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + error = AnalyzeDocumentsError.DeserializeAnalyzeDocumentsError(property.Value, options); continue; } if (options.Format != "W") @@ -84,50 +97,50 @@ internal static ListComponent DeserializeListComponent(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new ListComponent(entityComponentKind, serializedAdditionalRawData, value); + return new DocumentError(id, error, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ListComponent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentError)} does not support writing '{options.Format}' format."); } } - ListComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DocumentError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeListComponent(document.RootElement, options); + return DeserializeDocumentError(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ListComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DocumentError)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ListComponent FromResponse(Response response) + internal static DocumentError FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeListComponent(document.RootElement); + return DeserializeDocumentError(document.RootElement); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.cs new file mode 100644 index 000000000000..ceb69f234559 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentError.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.AI.Language.Documents +{ + /// Contains details of errors encountered during a job execution. + public partial class DocumentError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 ID of the input document. + /// Error encountered. + /// or is null. + internal DocumentError(string id, AnalyzeDocumentsError error) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(error, nameof(error)); + + Id = id; + Error = error; + } + + /// Initializes a new instance of . + /// The ID of the input document. + /// Error encountered. + /// Keeps track of any properties unknown to the library. + internal DocumentError(string id, AnalyzeDocumentsError error, IDictionary serializedAdditionalRawData) + { + Id = id; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentError() + { + } + + /// The ID of the input document. + public string Id { get; } + /// Error encountered. + public AnalyzeDocumentsError Error { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocation.Serialization.cs new file mode 100644 index 000000000000..1242c0c3ff07 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocation.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + [PersistableModelProxy(typeof(UnknownDocumentLocation))] + public partial class DocumentLocation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentLocation)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentLocation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentLocation(document.RootElement, options); + } + + internal static DocumentLocation DeserializeDocumentLocation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureBlob": return AzureBlobDocumentLocation.DeserializeAzureBlobDocumentLocation(element, options); + } + } + return UnknownDocumentLocation.DeserializeUnknownDocumentLocation(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentLocation)} does not support writing '{options.Format}' format."); + } + } + + DocumentLocation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentLocation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentLocation)} 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 DocumentLocation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentLocation(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocation.cs new file mode 100644 index 000000000000..037427b3550b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocation.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.AI.Language.Documents +{ + /// + /// Contains the location of the document. + /// 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 DocumentLocation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DocumentLocation() + { + } + + /// Initializes a new instance of . + /// The kind of the document location. + /// Keeps track of any properties unknown to the library. + internal DocumentLocation(DocumentLocationKind kind, IDictionary serializedAdditionalRawData) + { + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The kind of the document location. + internal DocumentLocationKind Kind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocationKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocationKind.cs new file mode 100644 index 000000000000..2115b341f300 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentLocationKind.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.AI.Language.Documents +{ + /// Enumeration of supported document locations. + internal readonly partial struct DocumentLocationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentLocationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureBlobValue = "AzureBlob"; + + /// The document is a URL. + public static DocumentLocationKind AzureBlob { get; } = new DocumentLocationKind(AzureBlobValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentLocationKind left, DocumentLocationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentLocationKind left, DocumentLocationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentLocationKind(string value) => new DocumentLocationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentLocationKind other && Equals(other); + /// + public bool Equals(DocumentLocationKind 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentStatistics.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentStatistics.Serialization.cs new file mode 100644 index 000000000000..9a5712454afe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentStatistics.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.AI.Language.Documents +{ + public partial class DocumentStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentStatistics)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("charactersCount"u8); + writer.WriteNumberValue(CharactersCount); + writer.WritePropertyName("transactionsCount"u8); + writer.WriteNumberValue(TransactionsCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentStatistics(document.RootElement, options); + } + + internal static DocumentStatistics DeserializeDocumentStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int charactersCount = default; + int transactionsCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("charactersCount"u8)) + { + charactersCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("transactionsCount"u8)) + { + transactionsCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentStatistics(charactersCount, transactionsCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentStatistics)} does not support writing '{options.Format}' format."); + } + } + + DocumentStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentStatistics)} 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 DocumentStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentStatistics(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentStatistics.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentStatistics.cs new file mode 100644 index 000000000000..2b4898b67b3c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentStatistics.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.AI.Language.Documents +{ + /// if showStats=true was specified in the request this field will contain information about the document payload. + public partial class DocumentStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Number of documents elements recognized in the document. + /// Number of transactions for the document. + internal DocumentStatistics(int charactersCount, int transactionsCount) + { + CharactersCount = charactersCount; + TransactionsCount = transactionsCount; + } + + /// Initializes a new instance of . + /// Number of documents elements recognized in the document. + /// Number of transactions for the document. + /// Keeps track of any properties unknown to the library. + internal DocumentStatistics(int charactersCount, int transactionsCount, IDictionary serializedAdditionalRawData) + { + CharactersCount = charactersCount; + TransactionsCount = transactionsCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentStatistics() + { + } + + /// Number of documents elements recognized in the document. + public int CharactersCount { get; } + /// Number of transactions for the document. + public int TransactionsCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentWarning.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentWarning.Serialization.cs new file mode 100644 index 000000000000..8367d1dda3e5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentWarning.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class DocumentWarning : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentWarning)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(TargetRef)) + { + writer.WritePropertyName("targetRef"u8); + writer.WriteStringValue(TargetRef); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentWarning)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentWarning(document.RootElement, options); + } + + internal static DocumentWarning DeserializeDocumentWarning(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WarningCode code = default; + string message = default; + string targetRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = new WarningCode(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetRef"u8)) + { + targetRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentWarning(code, message, targetRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentWarning)} does not support writing '{options.Format}' format."); + } + } + + DocumentWarning IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentWarning(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentWarning)} 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 DocumentWarning FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentWarning(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentWarning.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentWarning.cs new file mode 100644 index 000000000000..2bf26ab264eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/DocumentWarning.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Contains the warnings object with warnings encountered for the processed document. + public partial class DocumentWarning + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Warning code. + /// Warning message. + /// is null. + internal DocumentWarning(WarningCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + } + + /// Initializes a new instance of . + /// Warning code. + /// Warning message. + /// A JSON pointer reference indicating the target object. + /// Keeps track of any properties unknown to the library. + internal DocumentWarning(WarningCode code, string message, string targetRef, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + TargetRef = targetRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentWarning() + { + } + + /// Warning code. + public WarningCode Code { get; } + /// Warning message. + public string Message { get; } + /// A JSON pointer reference indicating the target object. + public string TargetRef { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/EntityMaskPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/EntityMaskPolicy.Serialization.cs new file mode 100644 index 000000000000..16b4c6e8fc65 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/EntityMaskPolicy.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class EntityMaskPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(EntityMaskPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + EntityMaskPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityMaskPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityMaskPolicy(document.RootElement, options); + } + + internal static EntityMaskPolicy DeserializeEntityMaskPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityMaskPolicy(policyKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityMaskPolicy)} does not support writing '{options.Format}' format."); + } + } + + EntityMaskPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEntityMaskPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityMaskPolicy)} 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 new EntityMaskPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityMaskPolicy(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/EntityMaskPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/EntityMaskPolicy.cs new file mode 100644 index 000000000000..1e246c4d5121 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/EntityMaskPolicy.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Represents the policy of redacting PII with the entity type. + public partial class EntityMaskPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + public EntityMaskPolicy() + { + PolicyKind = RedactionPolicyKind.EntityMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal EntityMaskPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.Serialization.cs similarity index 59% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.Serialization.cs index e462a6282017..b622ef4bb69c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomSentimentAnalysisActionContent : IUtf8JsonSerializable, IJsonModel + public partial class ExtractiveSummarizationActionContent : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter write /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationActionContent)} does not support writing '{format}' format."); } if (Optional.IsDefined(LoggingOptOut)) @@ -39,15 +39,31 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("loggingOptOut"u8); writer.WriteBooleanValue(LoggingOptOut.Value); } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); + if (Optional.IsDefined(ModelVersion)) + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } + if (Optional.IsDefined(SentenceCount)) + { + writer.WritePropertyName("sentenceCount"u8); + writer.WriteNumberValue(SentenceCount.Value); + } + if (Optional.IsDefined(SortBy)) + { + writer.WritePropertyName("sortBy"u8); + writer.WriteStringValue(SortBy.Value.ToString()); + } if (Optional.IsDefined(StringIndexType)) { writer.WritePropertyName("stringIndexType"u8); writer.WriteStringValue(StringIndexType.Value.ToString()); } + if (Optional.IsDefined(Query)) + { + writer.WritePropertyName("query"u8); + writer.WriteStringValue(Query); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -65,19 +81,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomSentimentAnalysisActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExtractiveSummarizationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationActionContent)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisActionContent(document.RootElement, options); + return DeserializeExtractiveSummarizationActionContent(document.RootElement, options); } - internal static CustomSentimentAnalysisActionContent DeserializeCustomSentimentAnalysisActionContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExtractiveSummarizationActionContent DeserializeExtractiveSummarizationActionContent(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,9 +102,11 @@ internal static CustomSentimentAnalysisActionContent DeserializeCustomSentimentA return null; } bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; + string modelVersion = default; + long? sentenceCount = default; + ExtractiveSummarizationSortingCriteria? sortBy = default; StringIndexType? stringIndexType = default; + string query = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -102,14 +120,27 @@ internal static CustomSentimentAnalysisActionContent DeserializeCustomSentimentA loggingOptOut = property.Value.GetBoolean(); continue; } - if (property.NameEquals("projectName"u8)) + if (property.NameEquals("modelVersion"u8)) + { + modelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sentenceCount"u8)) { - projectName = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sentenceCount = property.Value.GetInt64(); continue; } - if (property.NameEquals("deploymentName"u8)) + if (property.NameEquals("sortBy"u8)) { - deploymentName = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sortBy = new ExtractiveSummarizationSortingCriteria(property.Value.GetString()); continue; } if (property.NameEquals("stringIndexType"u8)) @@ -121,52 +152,64 @@ internal static CustomSentimentAnalysisActionContent DeserializeCustomSentimentA stringIndexType = new StringIndexType(property.Value.GetString()); continue; } + if (property.NameEquals("query"u8)) + { + query = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData); + return new ExtractiveSummarizationActionContent( + loggingOptOut, + modelVersion, + sentenceCount, + sortBy, + stringIndexType, + query, + serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationActionContent)} does not support writing '{options.Format}' format."); } } - CustomSentimentAnalysisActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExtractiveSummarizationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisActionContent(document.RootElement, options); + return DeserializeExtractiveSummarizationActionContent(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationActionContent)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomSentimentAnalysisActionContent FromResponse(Response response) + internal static ExtractiveSummarizationActionContent FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisActionContent(document.RootElement); + return DeserializeExtractiveSummarizationActionContent(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.cs similarity index 52% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.cs index c5ab770779f8..8594b8a49bbd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationActionContent.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - /// Supported parameters for a Custom Sentiment Analysis task. - public partial class CustomSentimentAnalysisActionContent + /// Supported parameters for an Extractive Summarization task. + public partial class ExtractiveSummarizationActionContent { /// /// Keeps track of any properties unknown to the library. @@ -45,46 +45,41 @@ public partial class CustomSentimentAnalysisActionContent /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) + /// Initializes a new instance of . + public ExtractiveSummarizationActionContent() { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. + /// model version. + /// Specifies the number of sentences in the extracted summary. + /// Specifies how to sort the extracted summaries. /// Specifies the method used to interpret string offsets. + /// (Optional) If provided, the query will be used to extract most relevant sentences from the document. /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisActionContent(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType, IDictionary serializedAdditionalRawData) + internal ExtractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, long? sentenceCount, ExtractiveSummarizationSortingCriteria? sortBy, StringIndexType? stringIndexType, string query, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; - ProjectName = projectName; - DeploymentName = deploymentName; + ModelVersion = modelVersion; + SentenceCount = sentenceCount; + SortBy = sortBy; StringIndexType = stringIndexType; + Query = query; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisActionContent() - { - } - /// logging opt out. public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } + /// model version. + public string ModelVersion { get; set; } + /// Specifies the number of sentences in the extracted summary. + public long? SentenceCount { get; set; } + /// Specifies how to sort the extracted summaries. + public ExtractiveSummarizationSortingCriteria? SortBy { get; set; } /// Specifies the method used to interpret string offsets. public StringIndexType? StringIndexType { get; set; } + /// (Optional) If provided, the query will be used to extract most relevant sentences from the document. + public string Query { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationAction.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationAction.Serialization.cs index 2f506a1d2118..4de29612a64e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationAction.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomSentimentAnalysisOperationAction : IUtf8JsonSerializable, IJsonModel + public partial class ExtractiveSummarizationOperationAction : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter wri /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationAction)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -42,19 +42,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - CustomSentimentAnalysisOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExtractiveSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationAction)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisOperationAction(document.RootElement, options); + return DeserializeExtractiveSummarizationOperationAction(document.RootElement, options); } - internal static CustomSentimentAnalysisOperationAction DeserializeCustomSentimentAnalysisOperationAction(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExtractiveSummarizationOperationAction DeserializeExtractiveSummarizationOperationAction(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,9 +62,9 @@ internal static CustomSentimentAnalysisOperationAction DeserializeCustomSentimen { return null; } - CustomSentimentAnalysisActionContent parameters = default; + ExtractiveSummarizationActionContent parameters = default; string taskName = default; - AnalyzeTextOperationActionKind kind = default; + AnalyzeDocumentsOperationActionKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -75,7 +75,7 @@ internal static CustomSentimentAnalysisOperationAction DeserializeCustomSentimen { continue; } - parameters = CustomSentimentAnalysisActionContent.DeserializeCustomSentimentAnalysisActionContent(property.Value, options); + parameters = ExtractiveSummarizationActionContent.DeserializeExtractiveSummarizationActionContent(property.Value, options); continue; } if (property.NameEquals("taskName"u8)) @@ -85,7 +85,7 @@ internal static CustomSentimentAnalysisOperationAction DeserializeCustomSentimen } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationActionKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -94,46 +94,46 @@ internal static CustomSentimentAnalysisOperationAction DeserializeCustomSentimen } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisOperationAction(taskName, kind, serializedAdditionalRawData, parameters); + return new ExtractiveSummarizationOperationAction(taskName, kind, serializedAdditionalRawData, parameters); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationAction)} does not support writing '{options.Format}' format."); } } - CustomSentimentAnalysisOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExtractiveSummarizationOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisOperationAction(document.RootElement, options); + return DeserializeExtractiveSummarizationOperationAction(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationAction)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomSentimentAnalysisOperationAction FromResponse(Response response) + internal static new ExtractiveSummarizationOperationAction FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisOperationAction(document.RootElement); + return DeserializeExtractiveSummarizationOperationAction(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationAction.cs new file mode 100644 index 000000000000..5a8b2b0f150c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationAction.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// An object representing the task definition for an Extractive Summarization task. + public partial class ExtractiveSummarizationOperationAction : AnalyzeDocumentsOperationAction + { + /// Initializes a new instance of . + public ExtractiveSummarizationOperationAction() + { + Kind = AnalyzeDocumentsOperationActionKind.ExtractiveSummarization; + } + + /// Initializes a new instance of . + /// task name. + /// The kind of task to perform. + /// Keeps track of any properties unknown to the library. + /// Parameters for the Extractive Summarization task. + internal ExtractiveSummarizationOperationAction(string name, AnalyzeDocumentsOperationActionKind kind, IDictionary serializedAdditionalRawData, ExtractiveSummarizationActionContent actionContent) : base(name, kind, serializedAdditionalRawData) + { + ActionContent = actionContent; + } + + /// Parameters for the Extractive Summarization task. + public ExtractiveSummarizationActionContent ActionContent { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationResult.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationResult.Serialization.cs index b44cfe65b3ef..711451177f81 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomSentimentAnalysisOperationResult : IUtf8JsonSerializable, IJsonModel + public partial class ExtractiveSummarizationOperationResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter wri /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationResult)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -39,19 +39,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Results, options); } - CustomSentimentAnalysisOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExtractiveSummarizationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisOperationResult(document.RootElement, options); + return DeserializeExtractiveSummarizationOperationResult(document.RootElement, options); } - internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimentAnalysisOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExtractiveSummarizationOperationResult DeserializeExtractiveSummarizationOperationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,18 +59,18 @@ internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimen { return null; } - CustomSentimentAnalysisResult results = default; + AnalyzeDocumentsResult results = default; DateTimeOffset lastUpdateDateTime = default; - TextActionState status = default; + DocumentActionState status = default; string taskName = default; - AnalyzeTextOperationResultsKind kind = default; + AnalyzeDocumentsOperationResultsKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) { - results = CustomSentimentAnalysisResult.DeserializeCustomSentimentAnalysisResult(property.Value, options); + results = AnalyzeDocumentsResult.DeserializeAnalyzeDocumentsResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) @@ -80,7 +80,7 @@ internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimen } if (property.NameEquals("status"u8)) { - status = new TextActionState(property.Value.GetString()); + status = new DocumentActionState(property.Value.GetString()); continue; } if (property.NameEquals("taskName"u8)) @@ -90,7 +90,7 @@ internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimen } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextOperationResultsKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationResultsKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimen } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisOperationResult( + return new ExtractiveSummarizationOperationResult( lastUpdateDateTime, status, taskName, @@ -108,43 +108,43 @@ internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimen results); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationResult)} does not support writing '{options.Format}' format."); } } - CustomSentimentAnalysisOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExtractiveSummarizationOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisOperationResult(document.RootElement, options); + return DeserializeExtractiveSummarizationOperationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExtractiveSummarizationOperationResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomSentimentAnalysisOperationResult FromResponse(Response response) + internal static new ExtractiveSummarizationOperationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisOperationResult(document.RootElement); + return DeserializeExtractiveSummarizationOperationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationResult.cs new file mode 100644 index 000000000000..63c37d775fa7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationOperationResult.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// An object representing the results for an Extractive Summarization task. + public partial class ExtractiveSummarizationOperationResult : AnalyzeDocumentsLROResult + { + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Results of the document task. + /// is null. + internal ExtractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, AnalyzeDocumentsResult results) : base(lastUpdateDateTime, status) + { + Argument.AssertNotNull(results, nameof(results)); + + Kind = AnalyzeDocumentsOperationResultsKind.ExtractiveSummarizationOperationResults; + Results = results; + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Keeps track of any properties unknown to the library. + /// Results of the document task. + internal ExtractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, string taskName, AnalyzeDocumentsOperationResultsKind kind, IDictionary serializedAdditionalRawData, AnalyzeDocumentsResult results) : base(lastUpdateDateTime, status, taskName, kind, serializedAdditionalRawData) + { + Results = results; + } + + /// Initializes a new instance of for deserialization. + internal ExtractiveSummarizationOperationResult() + { + } + + /// Results of the document task. + public AnalyzeDocumentsResult Results { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationSortingCriteria.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationSortingCriteria.cs new file mode 100644 index 000000000000..b860d166f406 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ExtractiveSummarizationSortingCriteria.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.AI.Language.Documents +{ + /// The sorting criteria to use for the results of Extractive Summarization. + public readonly partial struct ExtractiveSummarizationSortingCriteria : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExtractiveSummarizationSortingCriteria(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OffsetValue = "Offset"; + private const string RankValue = "Rank"; + + /// Indicates that results should be sorted in order of appearance in the text. + public static ExtractiveSummarizationSortingCriteria Offset { get; } = new ExtractiveSummarizationSortingCriteria(OffsetValue); + /// Indicates that results should be sorted in order of importance (i.e. rank score) according to the model. + public static ExtractiveSummarizationSortingCriteria Rank { get; } = new ExtractiveSummarizationSortingCriteria(RankValue); + /// Determines if two values are the same. + public static bool operator ==(ExtractiveSummarizationSortingCriteria left, ExtractiveSummarizationSortingCriteria right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExtractiveSummarizationSortingCriteria left, ExtractiveSummarizationSortingCriteria right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExtractiveSummarizationSortingCriteria(string value) => new ExtractiveSummarizationSortingCriteria(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExtractiveSummarizationSortingCriteria other && Equals(other); + /// + public bool Equals(ExtractiveSummarizationSortingCriteria 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorCode.cs new file mode 100644 index 000000000000..31129c5ec449 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorCode.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// Human-readable error code. + public readonly partial struct InnerErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InnerErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidRequestValue = "InvalidRequest"; + private const string InvalidParameterValueValue = "InvalidParameterValue"; + private const string KnowledgeBaseNotFoundValue = "KnowledgeBaseNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string ExtractionFailureValue = "ExtractionFailure"; + private const string InvalidRequestBodyFormatValue = "InvalidRequestBodyFormat"; + private const string EmptyRequestValue = "EmptyRequest"; + private const string MissingInputDocumentsValue = "MissingInputDocuments"; + private const string InvalidDocumentValue = "InvalidDocument"; + private const string ModelVersionIncorrectValue = "ModelVersionIncorrect"; + private const string InvalidDocumentBatchValue = "InvalidDocumentBatch"; + private const string UnsupportedLanguageCodeValue = "UnsupportedLanguageCode"; + private const string InvalidCountryHintValue = "InvalidCountryHint"; + + /// Invalid request error. + public static InnerErrorCode InvalidRequest { get; } = new InnerErrorCode(InvalidRequestValue); + /// Invalid parameter value error. + public static InnerErrorCode InvalidParameterValue { get; } = new InnerErrorCode(InvalidParameterValueValue); + /// Knowledge base not found error. + public static InnerErrorCode KnowledgeBaseNotFound { get; } = new InnerErrorCode(KnowledgeBaseNotFoundValue); + /// Azure Cognitive Search not found error. + public static InnerErrorCode AzureCognitiveSearchNotFound { get; } = new InnerErrorCode(AzureCognitiveSearchNotFoundValue); + /// Azure Cognitive Search throttling error. + public static InnerErrorCode AzureCognitiveSearchThrottling { get; } = new InnerErrorCode(AzureCognitiveSearchThrottlingValue); + /// Extraction failure error. + public static InnerErrorCode ExtractionFailure { get; } = new InnerErrorCode(ExtractionFailureValue); + /// Invalid request body format error. + public static InnerErrorCode InvalidRequestBodyFormat { get; } = new InnerErrorCode(InvalidRequestBodyFormatValue); + /// Empty request error. + public static InnerErrorCode EmptyRequest { get; } = new InnerErrorCode(EmptyRequestValue); + /// Missing input documents error. + public static InnerErrorCode MissingInputDocuments { get; } = new InnerErrorCode(MissingInputDocumentsValue); + /// Invalid document error. + public static InnerErrorCode InvalidDocument { get; } = new InnerErrorCode(InvalidDocumentValue); + /// Model version incorrect error. + public static InnerErrorCode ModelVersionIncorrect { get; } = new InnerErrorCode(ModelVersionIncorrectValue); + /// Invalid document batch error. + public static InnerErrorCode InvalidDocumentBatch { get; } = new InnerErrorCode(InvalidDocumentBatchValue); + /// Unsupported language code error. + public static InnerErrorCode UnsupportedLanguageCode { get; } = new InnerErrorCode(UnsupportedLanguageCodeValue); + /// Invalid country hint error. + public static InnerErrorCode InvalidCountryHint { get; } = new InnerErrorCode(InvalidCountryHintValue); + /// Determines if two values are the same. + public static bool operator ==(InnerErrorCode left, InnerErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InnerErrorCode left, InnerErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InnerErrorCode(string value) => new InnerErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InnerErrorCode other && Equals(other); + /// + public bool Equals(InnerErrorCode 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.Serialization.cs similarity index 51% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.Serialization.cs index 74f43285ba8b..8d15ab03b027 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class DynamicClassificationActionContent : IUtf8JsonSerializable, IJsonModel + public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,34 +28,37 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LoggingOptOut)) + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsCollectionDefined(Details)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); + writer.WritePropertyName("details"u8); + writer.WriteStartObject(); + foreach (var item in Details) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - if (Optional.IsDefined(ClassificationType)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("classificationType"u8); - writer.WriteStringValue(ClassificationType.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } - writer.WritePropertyName("categories"u8); - writer.WriteStartArray(); - foreach (var item in Categories) + if (Optional.IsDefined(Innererror)) { - writer.WriteStringValue(item); + writer.WritePropertyName("innererror"u8); + writer.WriteObjectValue(Innererror, options); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DynamicClassificationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationActionContent(document.RootElement, options); + return DeserializeInnerErrorModel(document.RootElement, options); } - internal static DynamicClassificationActionContent DeserializeDynamicClassificationActionContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -93,45 +96,51 @@ internal static DynamicClassificationActionContent DeserializeDynamicClassificat { return null; } - bool? loggingOptOut = default; - string modelVersion = default; - ClassificationType? classificationType = default; - IList categories = default; + InnerErrorCode code = default; + string message = default; + IReadOnlyDictionary details = default; + string target = default; + InnerErrorModel innererror = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("loggingOptOut"u8)) + if (property.NameEquals("code"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); + code = new InnerErrorCode(property.Value.GetString()); continue; } - if (property.NameEquals("modelVersion"u8)) + if (property.NameEquals("message"u8)) { - modelVersion = property.Value.GetString(); + message = property.Value.GetString(); continue; } - if (property.NameEquals("classificationType"u8)) + if (property.NameEquals("details"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - classificationType = new ClassificationType(property.Value.GetString()); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + details = dictionary; + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } - if (property.NameEquals("categories"u8)) + if (property.NameEquals("innererror"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + if (property.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + continue; } - categories = array; + innererror = DeserializeInnerErrorModel(property.Value, options); continue; } if (options.Format != "W") @@ -140,46 +149,52 @@ internal static DynamicClassificationActionContent DeserializeDynamicClassificat } } serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationActionContent(loggingOptOut, modelVersion, classificationType, categories, serializedAdditionalRawData); + return new InnerErrorModel( + code, + message, + details ?? new ChangeTrackingDictionary(), + target, + innererror, + serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{options.Format}' format."); } } - DynamicClassificationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + InnerErrorModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeDynamicClassificationActionContent(document.RootElement, options); + return DeserializeInnerErrorModel(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DynamicClassificationActionContent FromResponse(Response response) + internal static InnerErrorModel FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationActionContent(document.RootElement); + return DeserializeInnerErrorModel(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.cs new file mode 100644 index 000000000000..d43e45493d49 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/InnerErrorModel.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.AI.Language.Documents +{ + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + public partial class InnerErrorModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// is null. + internal InnerErrorModel(InnerErrorCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// Error details. + /// Error target. + /// An object containing more specific information than the current object about the error. + /// Keeps track of any properties unknown to the library. + internal InnerErrorModel(InnerErrorCode code, string message, IReadOnlyDictionary details, string target, InnerErrorModel innererror, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Details = details; + Target = target; + Innererror = innererror; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InnerErrorModel() + { + } + + /// One of a server-defined set of error codes. + public InnerErrorCode Code { get; } + /// Error message. + public string Message { get; } + /// Error details. + public IReadOnlyDictionary Details { get; } + /// Error target. + public string Target { get; } + /// An object containing more specific information than the current object about the error. + public InnerErrorModel Innererror { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/Argument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..f236086f091a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents +{ + 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..d11944f140af --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents +{ + 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ChangeTrackingList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..9881ee1b94eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents +{ + 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..65d7dae2faad --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) 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.AI.Language.Documents +{ + internal static class ModelSerializationExtensions + { + 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/Optional.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..9b0de59ffbac --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents +{ + 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..8ec6f6ae5b6e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents +{ + 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageDocumentInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageDocumentInput.Serialization.cs new file mode 100644 index 000000000000..60a9ec4d63cd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageDocumentInput.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.AI.Language.Documents +{ + public partial class MultiLanguageDocumentInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLanguageDocumentInput)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MultiLanguageDocumentInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLanguageDocumentInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiLanguageDocumentInput(document.RootElement, options); + } + + internal static MultiLanguageDocumentInput DeserializeMultiLanguageDocumentInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("documents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MultiLanguageInput.DeserializeMultiLanguageInput(item, options)); + } + documents = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiLanguageDocumentInput(documents ?? 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(MultiLanguageDocumentInput)} does not support writing '{options.Format}' format."); + } + } + + MultiLanguageDocumentInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMultiLanguageDocumentInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiLanguageDocumentInput)} 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 MultiLanguageDocumentInput FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiLanguageDocumentInput(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageDocumentInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageDocumentInput.cs new file mode 100644 index 000000000000..0850abbd565a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageDocumentInput.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.AI.Language.Documents +{ + /// Collection of input documents to be analyzed by the service. + public partial class MultiLanguageDocumentInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 MultiLanguageDocumentInput() + { + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The input documents to be analyzed. + /// Keeps track of any properties unknown to the library. + internal MultiLanguageDocumentInput(IList documents, IDictionary serializedAdditionalRawData) + { + Documents = documents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The input documents to be analyzed. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageInput.Serialization.cs new file mode 100644 index 000000000000..a64c69d31fbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageInput.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.AI.Language.Documents +{ + public partial class MultiLanguageInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLanguageInput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source, options); + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MultiLanguageInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLanguageInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiLanguageInput(document.RootElement, options); + } + + internal static MultiLanguageInput DeserializeMultiLanguageInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + DocumentLocation source = default; + DocumentLocation target = default; + string language = 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 = DocumentLocation.DeserializeDocumentLocation(property.Value, options); + continue; + } + if (property.NameEquals("target"u8)) + { + target = DocumentLocation.DeserializeDocumentLocation(property.Value, options); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiLanguageInput(id, source, target, language, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MultiLanguageInput)} does not support writing '{options.Format}' format."); + } + } + + MultiLanguageInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMultiLanguageInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiLanguageInput)} 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 MultiLanguageInput FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiLanguageInput(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageInput.cs new file mode 100644 index 000000000000..abc5e6bcf167 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/MultiLanguageInput.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.AI.Language.Documents +{ + /// Contains an input document to be analyzed by the service. + public partial class MultiLanguageInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 unique, non-empty document identifier. + /// + /// The location of the input document to process. + /// 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 . + /// + /// + /// The location where the processed document will be stored. + /// 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 MultiLanguageInput(string id, DocumentLocation source, DocumentLocation target) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(target, nameof(target)); + + Id = id; + Source = source; + Target = target; + } + + /// Initializes a new instance of . + /// A unique, non-empty document identifier. + /// + /// The location of the input document to process. + /// 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 . + /// + /// + /// The location where the processed document will be stored. + /// 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 . + /// + /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default. + /// Keeps track of any properties unknown to the library. + internal MultiLanguageInput(string id, DocumentLocation source, DocumentLocation target, string language, IDictionary serializedAdditionalRawData) + { + Id = id; + Source = source; + Target = target; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MultiLanguageInput() + { + } + + /// A unique, non-empty document identifier. + public string Id { get; } + /// + /// The location of the input document to process. + /// 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 DocumentLocation Source { get; } + /// + /// The location where the processed document will be stored. + /// 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 DocumentLocation Target { get; } + /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default. + public string Language { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/NoMaskPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/NoMaskPolicy.Serialization.cs new file mode 100644 index 000000000000..f7c3fa64bb0b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/NoMaskPolicy.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class NoMaskPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(NoMaskPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + NoMaskPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NoMaskPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNoMaskPolicy(document.RootElement, options); + } + + internal static NoMaskPolicy DeserializeNoMaskPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NoMaskPolicy(policyKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NoMaskPolicy)} does not support writing '{options.Format}' format."); + } + } + + NoMaskPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNoMaskPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NoMaskPolicy)} 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 new NoMaskPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNoMaskPolicy(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/NoMaskPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/NoMaskPolicy.cs new file mode 100644 index 000000000000..c5f8aa50b3da --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/NoMaskPolicy.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Represents the policy of not redacting found PII. + public partial class NoMaskPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + public NoMaskPolicy() + { + PolicyKind = RedactionPolicyKind.NoMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal NoMaskPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiActionContent.Serialization.cs new file mode 100644 index 000000000000..76ba90e0cf0d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiActionContent.Serialization.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class PiiActionContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PiiActionContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(LoggingOptOut)) + { + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); + } + if (Optional.IsDefined(ModelVersion)) + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain.Value.ToString()); + } + if (Optional.IsCollectionDefined(PiiCategories)) + { + writer.WritePropertyName("piiCategories"u8); + writer.WriteStartArray(); + foreach (var item in PiiCategories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(StringIndexType)) + { + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.Value.ToString()); + } + if (Optional.IsCollectionDefined(ExcludePiiCategories)) + { + writer.WritePropertyName("excludePiiCategories"u8); + writer.WriteStartArray(); + foreach (var item in ExcludePiiCategories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RedactionPolicy)) + { + writer.WritePropertyName("redactionPolicy"u8); + writer.WriteObjectValue(RedactionPolicy, options); + } + if (Optional.IsDefined(ExcludeExtractionData)) + { + writer.WritePropertyName("excludeExtractionData"u8); + writer.WriteBooleanValue(ExcludeExtractionData.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PiiActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PiiActionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePiiActionContent(document.RootElement, options); + } + + internal static PiiActionContent DeserializePiiActionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? loggingOptOut = default; + string modelVersion = default; + PiiDomain? domain = default; + IList piiCategories = default; + StringIndexType? stringIndexType = default; + IList excludePiiCategories = default; + BaseRedactionPolicy redactionPolicy = default; + bool? excludeExtractionData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loggingOptOut"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loggingOptOut = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("modelVersion"u8)) + { + modelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + domain = new PiiDomain(property.Value.GetString()); + continue; + } + if (property.NameEquals("piiCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new PiiCategory(item.GetString())); + } + piiCategories = array; + continue; + } + if (property.NameEquals("stringIndexType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stringIndexType = new StringIndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("excludePiiCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new PiiCategoriesExclude(item.GetString())); + } + excludePiiCategories = array; + continue; + } + if (property.NameEquals("redactionPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionPolicy = BaseRedactionPolicy.DeserializeBaseRedactionPolicy(property.Value, options); + continue; + } + if (property.NameEquals("excludeExtractionData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + excludeExtractionData = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PiiActionContent( + loggingOptOut, + modelVersion, + domain, + piiCategories ?? new ChangeTrackingList(), + stringIndexType, + excludePiiCategories ?? new ChangeTrackingList(), + redactionPolicy, + excludeExtractionData, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PiiActionContent)} does not support writing '{options.Format}' format."); + } + } + + PiiActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePiiActionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PiiActionContent)} 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 PiiActionContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePiiActionContent(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiActionContent.cs new file mode 100644 index 000000000000..d93ab4e2b06c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiActionContent.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Supported parameters for a PII Entities Recognition task. + public partial class PiiActionContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 PiiActionContent() + { + PiiCategories = new ChangeTrackingList(); + ExcludePiiCategories = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// logging opt out. + /// model version. + /// Domain for PII task. + /// Enumeration of PII categories to be returned in the response. + /// StringIndexType to be used for analysis. + /// Enumeration of PII categories to be excluded in the response. + /// + /// Redaction policy to be used when redacting from documents + /// 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 . + /// + /// Boolean to indicate if entities should be excluded from the response json stored in the customer's storage. + /// Keeps track of any properties unknown to the library. + internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType, IList excludePiiCategories, BaseRedactionPolicy redactionPolicy, bool? excludeExtractionData, IDictionary serializedAdditionalRawData) + { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; + Domain = domain; + PiiCategories = piiCategories; + StringIndexType = stringIndexType; + ExcludePiiCategories = excludePiiCategories; + RedactionPolicy = redactionPolicy; + ExcludeExtractionData = excludeExtractionData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Domain for PII task. + public PiiDomain? Domain { get; set; } + /// Enumeration of PII categories to be returned in the response. + public IList PiiCategories { get; } + /// StringIndexType to be used for analysis. + public StringIndexType? StringIndexType { get; set; } + /// Enumeration of PII categories to be excluded in the response. + public IList ExcludePiiCategories { get; } + /// + /// Redaction policy to be used when redacting from documents + /// 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 BaseRedactionPolicy RedactionPolicy { get; set; } + /// Boolean to indicate if entities should be excluded from the response json stored in the customer's storage. + public bool? ExcludeExtractionData { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiCategoriesExclude.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiCategoriesExclude.cs new file mode 100644 index 000000000000..26da0bfc7a83 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiCategoriesExclude.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// (Optional) describes the PII categories to return. + public readonly partial struct PiiCategoriesExclude : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PiiCategoriesExclude(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AbaRoutingNumberValue = "ABARoutingNumber"; + private const string ArNationalIdentityNumberValue = "ARNationalIdentityNumber"; + private const string AuBankAccountNumberValue = "AUBankAccountNumber"; + private const string AuDriversLicenseNumberValue = "AUDriversLicenseNumber"; + private const string AuMedicalAccountNumberValue = "AUMedicalAccountNumber"; + private const string AuPassportNumberValue = "AUPassportNumber"; + private const string AuTaxFileNumberValue = "AUTaxFileNumber"; + private const string AuBusinessNumberValue = "AUBusinessNumber"; + private const string AuCompanyNumberValue = "AUCompanyNumber"; + private const string AtIdentityCardValue = "ATIdentityCard"; + private const string AtTaxIdentificationNumberValue = "ATTaxIdentificationNumber"; + private const string AtValueAddedTaxNumberValue = "ATValueAddedTaxNumber"; + private const string AzureDocumentDbauthKeyValue = "AzureDocumentDBAuthKey"; + private const string AzureIaasDatabaseConnectionAndSqlStringValue = "AzureIAASDatabaseConnectionAndSQLString"; + private const string AzureIoTConnectionStringValue = "AzureIoTConnectionString"; + private const string AzurePublishSettingPasswordValue = "AzurePublishSettingPassword"; + private const string AzureRedisCacheStringValue = "AzureRedisCacheString"; + private const string AzureSasValue = "AzureSAS"; + private const string AzureServiceBusStringValue = "AzureServiceBusString"; + private const string AzureStorageAccountKeyValue = "AzureStorageAccountKey"; + private const string AzureStorageAccountGenericValue = "AzureStorageAccountGeneric"; + private const string BeNationalNumberValue = "BENationalNumber"; + private const string BeNationalNumberV2Value = "BENationalNumberV2"; + private const string BeValueAddedTaxNumberValue = "BEValueAddedTaxNumber"; + private const string BrCpfNumberValue = "BRCPFNumber"; + private const string BrLegalEntityNumberValue = "BRLegalEntityNumber"; + private const string BrNationalIdRgValue = "BRNationalIDRG"; + private const string BgUniformCivilNumberValue = "BGUniformCivilNumber"; + private const string CaBankAccountNumberValue = "CABankAccountNumber"; + private const string CaDriversLicenseNumberValue = "CADriversLicenseNumber"; + private const string CaHealthServiceNumberValue = "CAHealthServiceNumber"; + private const string CaPassportNumberValue = "CAPassportNumber"; + private const string CaPersonalHealthIdentificationValue = "CAPersonalHealthIdentification"; + private const string CaSocialInsuranceNumberValue = "CASocialInsuranceNumber"; + private const string ClIdentityCardNumberValue = "CLIdentityCardNumber"; + private const string CnResidentIdentityCardNumberValue = "CNResidentIdentityCardNumber"; + private const string CreditCardNumberValue = "CreditCardNumber"; + private const string HrIdentityCardNumberValue = "HRIdentityCardNumber"; + private const string HrNationalIdNumberValue = "HRNationalIDNumber"; + private const string HrPersonalIdentificationNumberValue = "HRPersonalIdentificationNumber"; + private const string HrPersonalIdentificationOIBNumberV2Value = "HRPersonalIdentificationOIBNumberV2"; + private const string CyIdentityCardValue = "CYIdentityCard"; + private const string CyTaxIdentificationNumberValue = "CYTaxIdentificationNumber"; + private const string CzPersonalIdentityNumberValue = "CZPersonalIdentityNumber"; + private const string CzPersonalIdentityV2Value = "CZPersonalIdentityV2"; + private const string DkPersonalIdentificationNumberValue = "DKPersonalIdentificationNumber"; + private const string DkPersonalIdentificationV2Value = "DKPersonalIdentificationV2"; + private const string DrugEnforcementAgencyNumberValue = "DrugEnforcementAgencyNumber"; + private const string EePersonalIdentificationCodeValue = "EEPersonalIdentificationCode"; + private const string EuDebitCardNumberValue = "EUDebitCardNumber"; + private const string EuDriversLicenseNumberValue = "EUDriversLicenseNumber"; + private const string EuGpsCoordinatesValue = "EUGPSCoordinates"; + private const string EuNationalIdentificationNumberValue = "EUNationalIdentificationNumber"; + private const string EuPassportNumberValue = "EUPassportNumber"; + private const string EuSocialSecurityNumberValue = "EUSocialSecurityNumber"; + private const string EuTaxIdentificationNumberValue = "EUTaxIdentificationNumber"; + private const string FiEuropeanHealthNumberValue = "FIEuropeanHealthNumber"; + private const string FiNationalIdValue = "FINationalID"; + private const string FiNationalIdV2Value = "FINationalIDV2"; + private const string FiPassportNumberValue = "FIPassportNumber"; + private const string FrDriversLicenseNumberValue = "FRDriversLicenseNumber"; + private const string FrHealthInsuranceNumberValue = "FRHealthInsuranceNumber"; + private const string FrNationalIdValue = "FRNationalID"; + private const string FrPassportNumberValue = "FRPassportNumber"; + private const string FrSocialSecurityNumberValue = "FRSocialSecurityNumber"; + private const string FrTaxIdentificationNumberValue = "FRTaxIdentificationNumber"; + private const string FrValueAddedTaxNumberValue = "FRValueAddedTaxNumber"; + private const string DeDriversLicenseNumberValue = "DEDriversLicenseNumber"; + private const string DePassportNumberValue = "DEPassportNumber"; + private const string DeIdentityCardNumberValue = "DEIdentityCardNumber"; + private const string DeTaxIdentificationNumberValue = "DETaxIdentificationNumber"; + private const string DeValueAddedNumberValue = "DEValueAddedNumber"; + private const string GrNationalIdCardValue = "GRNationalIDCard"; + private const string GrNationalIdV2Value = "GRNationalIDV2"; + private const string GrTaxIdentificationNumberValue = "GRTaxIdentificationNumber"; + private const string HkIdentityCardNumberValue = "HKIdentityCardNumber"; + private const string HuValueAddedNumberValue = "HUValueAddedNumber"; + private const string HuPersonalIdentificationNumberValue = "HUPersonalIdentificationNumber"; + private const string HuTaxIdentificationNumberValue = "HUTaxIdentificationNumber"; + private const string InPermanentAccountValue = "INPermanentAccount"; + private const string InUniqueIdentificationNumberValue = "INUniqueIdentificationNumber"; + private const string IdIdentityCardNumberValue = "IDIdentityCardNumber"; + private const string InternationalBankingAccountNumberValue = "InternationalBankingAccountNumber"; + private const string IePersonalPublicServiceNumberValue = "IEPersonalPublicServiceNumber"; + private const string IePersonalPublicServiceNumberV2Value = "IEPersonalPublicServiceNumberV2"; + private const string IlBankAccountNumberValue = "ILBankAccountNumber"; + private const string IlNationalIdValue = "ILNationalID"; + private const string ItDriversLicenseNumberValue = "ITDriversLicenseNumber"; + private const string ItFiscalCodeValue = "ITFiscalCode"; + private const string ItValueAddedTaxNumberValue = "ITValueAddedTaxNumber"; + private const string JpBankAccountNumberValue = "JPBankAccountNumber"; + private const string JpDriversLicenseNumberValue = "JPDriversLicenseNumber"; + private const string JpPassportNumberValue = "JPPassportNumber"; + private const string JpResidentRegistrationNumberValue = "JPResidentRegistrationNumber"; + private const string JpSocialInsuranceNumberValue = "JPSocialInsuranceNumber"; + private const string JpMyNumberCorporateValue = "JPMyNumberCorporate"; + private const string JpMyNumberPersonalValue = "JPMyNumberPersonal"; + private const string JpResidenceCardNumberValue = "JPResidenceCardNumber"; + private const string LvPersonalCodeValue = "LVPersonalCode"; + private const string LtPersonalCodeValue = "LTPersonalCode"; + private const string LuNationalIdentificationNumberNaturalValue = "LUNationalIdentificationNumberNatural"; + private const string LuNationalIdentificationNumberNonNaturalValue = "LUNationalIdentificationNumberNonNatural"; + private const string MyIdentityCardNumberValue = "MYIdentityCardNumber"; + private const string MtIdentityCardNumberValue = "MTIdentityCardNumber"; + private const string MtTaxIdNumberValue = "MTTaxIDNumber"; + private const string NlCitizensServiceNumberValue = "NLCitizensServiceNumber"; + private const string NlCitizensServiceNumberV2Value = "NLCitizensServiceNumberV2"; + private const string NlTaxIdentificationNumberValue = "NLTaxIdentificationNumber"; + private const string NlValueAddedTaxNumberValue = "NLValueAddedTaxNumber"; + private const string NzBankAccountNumberValue = "NZBankAccountNumber"; + private const string NzDriversLicenseNumberValue = "NZDriversLicenseNumber"; + private const string NzInlandRevenueNumberValue = "NZInlandRevenueNumber"; + private const string NzMinistryOfHealthNumberValue = "NZMinistryOfHealthNumber"; + private const string NzSocialWelfareNumberValue = "NZSocialWelfareNumber"; + private const string NoIdentityNumberValue = "NOIdentityNumber"; + private const string PhUnifiedMultiPurposeIdNumberValue = "PHUnifiedMultiPurposeIDNumber"; + private const string PlIdentityCardValue = "PLIdentityCard"; + private const string PlNationalIdValue = "PLNationalID"; + private const string PlNationalIdV2Value = "PLNationalIDV2"; + private const string PlPassportNumberValue = "PLPassportNumber"; + private const string PlTaxIdentificationNumberValue = "PLTaxIdentificationNumber"; + private const string PlRegonNumberValue = "PLREGONNumber"; + private const string PtCitizenCardNumberValue = "PTCitizenCardNumber"; + private const string PtCitizenCardNumberV2Value = "PTCitizenCardNumberV2"; + private const string PtTaxIdentificationNumberValue = "PTTaxIdentificationNumber"; + private const string RoPersonalNumericalCodeValue = "ROPersonalNumericalCode"; + private const string RuPassportNumberDomesticValue = "RUPassportNumberDomestic"; + private const string RuPassportNumberInternationalValue = "RUPassportNumberInternational"; + private const string SaNationalIdValue = "SANationalID"; + private const string SgNationalRegistrationIdentityCardNumberValue = "SGNationalRegistrationIdentityCardNumber"; + private const string SkPersonalNumberValue = "SKPersonalNumber"; + private const string SiTaxIdentificationNumberValue = "SITaxIdentificationNumber"; + private const string SiUniqueMasterCitizenNumberValue = "SIUniqueMasterCitizenNumber"; + private const string ZaIdentificationNumberValue = "ZAIdentificationNumber"; + private const string KrResidentRegistrationNumberValue = "KRResidentRegistrationNumber"; + private const string EsDniValue = "ESDNI"; + private const string EsSocialSecurityNumberValue = "ESSocialSecurityNumber"; + private const string EsTaxIdentificationNumberValue = "ESTaxIdentificationNumber"; + private const string SqlServerConnectionStringValue = "SQLServerConnectionString"; + private const string SeNationalIdValue = "SENationalID"; + private const string SeNationalIdV2Value = "SENationalIDV2"; + private const string SePassportNumberValue = "SEPassportNumber"; + private const string SeTaxIdentificationNumberValue = "SETaxIdentificationNumber"; + private const string SwiftCodeValue = "SWIFTCode"; + private const string ChSocialSecurityNumberValue = "CHSocialSecurityNumber"; + private const string TwNationalIdValue = "TWNationalID"; + private const string TwPassportNumberValue = "TWPassportNumber"; + private const string TwResidentCertificateValue = "TWResidentCertificate"; + private const string ThPopulationIdentificationCodeValue = "THPopulationIdentificationCode"; + private const string TrNationalIdentificationNumberValue = "TRNationalIdentificationNumber"; + private const string UkDriversLicenseNumberValue = "UKDriversLicenseNumber"; + private const string UkElectoralRollNumberValue = "UKElectoralRollNumber"; + private const string UkNationalHealthNumberValue = "UKNationalHealthNumber"; + private const string UkNationalInsuranceNumberValue = "UKNationalInsuranceNumber"; + private const string UkUniqueTaxpayerNumberValue = "UKUniqueTaxpayerNumber"; + private const string UsUkPassportNumberValue = "USUKPassportNumber"; + private const string UsBankAccountNumberValue = "USBankAccountNumber"; + private const string UsDriversLicenseNumberValue = "USDriversLicenseNumber"; + private const string UsIndividualTaxpayerIdentificationValue = "USIndividualTaxpayerIdentification"; + private const string UsSocialSecurityNumberValue = "USSocialSecurityNumber"; + private const string UaPassportNumberDomesticValue = "UAPassportNumberDomestic"; + private const string UaPassportNumberInternationalValue = "UAPassportNumberInternational"; + private const string OrganizationValue = "Organization"; + private const string EmailValue = "Email"; + private const string URLValue = "URL"; + private const string AgeValue = "Age"; + private const string PhoneNumberValue = "PhoneNumber"; + private const string IPAddressValue = "IPAddress"; + private const string DateValue = "Date"; + private const string PersonValue = "Person"; + private const string AddressValue = "Address"; + + /// ABA Routing number. + public static PiiCategoriesExclude AbaRoutingNumber { get; } = new PiiCategoriesExclude(AbaRoutingNumberValue); + /// AR National Identity Number. + public static PiiCategoriesExclude ArNationalIdentityNumber { get; } = new PiiCategoriesExclude(ArNationalIdentityNumberValue); + /// AT Identity Card. + public static PiiCategoriesExclude AuBankAccountNumber { get; } = new PiiCategoriesExclude(AuBankAccountNumberValue); + /// AU Driver's License Number. + public static PiiCategoriesExclude AuDriversLicenseNumber { get; } = new PiiCategoriesExclude(AuDriversLicenseNumberValue); + /// AU Medical Account Number. + public static PiiCategoriesExclude AuMedicalAccountNumber { get; } = new PiiCategoriesExclude(AuMedicalAccountNumberValue); + /// AU Passport Number. + public static PiiCategoriesExclude AuPassportNumber { get; } = new PiiCategoriesExclude(AuPassportNumberValue); + /// AU Tax File Number. + public static PiiCategoriesExclude AuTaxFileNumber { get; } = new PiiCategoriesExclude(AuTaxFileNumberValue); + /// AU Business Number. + public static PiiCategoriesExclude AuBusinessNumber { get; } = new PiiCategoriesExclude(AuBusinessNumberValue); + /// AU Company Number. + public static PiiCategoriesExclude AuCompanyNumber { get; } = new PiiCategoriesExclude(AuCompanyNumberValue); + /// AT Identity Card. + public static PiiCategoriesExclude AtIdentityCard { get; } = new PiiCategoriesExclude(AtIdentityCardValue); + /// AT Tax Identification Number. + public static PiiCategoriesExclude AtTaxIdentificationNumber { get; } = new PiiCategoriesExclude(AtTaxIdentificationNumberValue); + /// AT Value Added Tax Number. + public static PiiCategoriesExclude AtValueAddedTaxNumber { get; } = new PiiCategoriesExclude(AtValueAddedTaxNumberValue); + /// Azure Document DB Auth Key. + public static PiiCategoriesExclude AzureDocumentDbauthKey { get; } = new PiiCategoriesExclude(AzureDocumentDbauthKeyValue); + /// Azure IAAS Database Connection And SQL String. + public static PiiCategoriesExclude AzureIaasDatabaseConnectionAndSqlString { get; } = new PiiCategoriesExclude(AzureIaasDatabaseConnectionAndSqlStringValue); + /// Azure IoT Connection String. + public static PiiCategoriesExclude AzureIoTConnectionString { get; } = new PiiCategoriesExclude(AzureIoTConnectionStringValue); + /// Azure Publish Setting Password. + public static PiiCategoriesExclude AzurePublishSettingPassword { get; } = new PiiCategoriesExclude(AzurePublishSettingPasswordValue); + /// Azure Redis Cache String. + public static PiiCategoriesExclude AzureRedisCacheString { get; } = new PiiCategoriesExclude(AzureRedisCacheStringValue); + /// Azure SAS. + public static PiiCategoriesExclude AzureSas { get; } = new PiiCategoriesExclude(AzureSasValue); + /// Azure Service Bus String. + public static PiiCategoriesExclude AzureServiceBusString { get; } = new PiiCategoriesExclude(AzureServiceBusStringValue); + /// Azure Storage Account Key. + public static PiiCategoriesExclude AzureStorageAccountKey { get; } = new PiiCategoriesExclude(AzureStorageAccountKeyValue); + /// Azure Storage Account Generic. + public static PiiCategoriesExclude AzureStorageAccountGeneric { get; } = new PiiCategoriesExclude(AzureStorageAccountGenericValue); + /// BE National Number. + public static PiiCategoriesExclude BeNationalNumber { get; } = new PiiCategoriesExclude(BeNationalNumberValue); + /// BE National Number V2. + public static PiiCategoriesExclude BeNationalNumberV2 { get; } = new PiiCategoriesExclude(BeNationalNumberV2Value); + /// BE Value Added Tax Number. + public static PiiCategoriesExclude BeValueAddedTaxNumber { get; } = new PiiCategoriesExclude(BeValueAddedTaxNumberValue); + /// BR CPF Number. + public static PiiCategoriesExclude BrCpfNumber { get; } = new PiiCategoriesExclude(BrCpfNumberValue); + /// BR Legal Entity Number. + public static PiiCategoriesExclude BrLegalEntityNumber { get; } = new PiiCategoriesExclude(BrLegalEntityNumberValue); + /// BR National ID RG. + public static PiiCategoriesExclude BrNationalIdRg { get; } = new PiiCategoriesExclude(BrNationalIdRgValue); + /// BG Uniform Civil Number. + public static PiiCategoriesExclude BgUniformCivilNumber { get; } = new PiiCategoriesExclude(BgUniformCivilNumberValue); + /// CA Bank Account Number. + public static PiiCategoriesExclude CaBankAccountNumber { get; } = new PiiCategoriesExclude(CaBankAccountNumberValue); + /// CA Driver's License Number. + public static PiiCategoriesExclude CaDriversLicenseNumber { get; } = new PiiCategoriesExclude(CaDriversLicenseNumberValue); + /// CA Health Service Number. + public static PiiCategoriesExclude CaHealthServiceNumber { get; } = new PiiCategoriesExclude(CaHealthServiceNumberValue); + /// CA Passport Number. + public static PiiCategoriesExclude CaPassportNumber { get; } = new PiiCategoriesExclude(CaPassportNumberValue); + /// CA Personal Health Identification. + public static PiiCategoriesExclude CaPersonalHealthIdentification { get; } = new PiiCategoriesExclude(CaPersonalHealthIdentificationValue); + /// CA Social Insurance Number. + public static PiiCategoriesExclude CaSocialInsuranceNumber { get; } = new PiiCategoriesExclude(CaSocialInsuranceNumberValue); + /// CL Identity Card Number. + public static PiiCategoriesExclude ClIdentityCardNumber { get; } = new PiiCategoriesExclude(ClIdentityCardNumberValue); + /// CN Resident Identity Card Number. + public static PiiCategoriesExclude CnResidentIdentityCardNumber { get; } = new PiiCategoriesExclude(CnResidentIdentityCardNumberValue); + /// Credit Card Number. + public static PiiCategoriesExclude CreditCardNumber { get; } = new PiiCategoriesExclude(CreditCardNumberValue); + /// HR Identity Card Number. + public static PiiCategoriesExclude HrIdentityCardNumber { get; } = new PiiCategoriesExclude(HrIdentityCardNumberValue); + /// HR National ID Number. + public static PiiCategoriesExclude HrNationalIdNumber { get; } = new PiiCategoriesExclude(HrNationalIdNumberValue); + /// HR Personal Identification Number. + public static PiiCategoriesExclude HrPersonalIdentificationNumber { get; } = new PiiCategoriesExclude(HrPersonalIdentificationNumberValue); + /// HR Personal Identification OIB Number V2. + public static PiiCategoriesExclude HrPersonalIdentificationOIBNumberV2 { get; } = new PiiCategoriesExclude(HrPersonalIdentificationOIBNumberV2Value); + /// CY Identity Card. + public static PiiCategoriesExclude CyIdentityCard { get; } = new PiiCategoriesExclude(CyIdentityCardValue); + /// CY Tax Identification Number. + public static PiiCategoriesExclude CyTaxIdentificationNumber { get; } = new PiiCategoriesExclude(CyTaxIdentificationNumberValue); + /// CZ Personal Identity Number. + public static PiiCategoriesExclude CzPersonalIdentityNumber { get; } = new PiiCategoriesExclude(CzPersonalIdentityNumberValue); + /// CZ Personal Identity V2. + public static PiiCategoriesExclude CzPersonalIdentityV2 { get; } = new PiiCategoriesExclude(CzPersonalIdentityV2Value); + /// DK Personal Identification Number. + public static PiiCategoriesExclude DkPersonalIdentificationNumber { get; } = new PiiCategoriesExclude(DkPersonalIdentificationNumberValue); + /// DK Personal Identification V2. + public static PiiCategoriesExclude DkPersonalIdentificationV2 { get; } = new PiiCategoriesExclude(DkPersonalIdentificationV2Value); + /// Drug Enforcement Agency Number. + public static PiiCategoriesExclude DrugEnforcementAgencyNumber { get; } = new PiiCategoriesExclude(DrugEnforcementAgencyNumberValue); + /// EE Personal Identification Code. + public static PiiCategoriesExclude EePersonalIdentificationCode { get; } = new PiiCategoriesExclude(EePersonalIdentificationCodeValue); + /// EU Debit Card Number. + public static PiiCategoriesExclude EuDebitCardNumber { get; } = new PiiCategoriesExclude(EuDebitCardNumberValue); + /// EU Driver's License Number. + public static PiiCategoriesExclude EuDriversLicenseNumber { get; } = new PiiCategoriesExclude(EuDriversLicenseNumberValue); + /// EU GPS Coordinates. + public static PiiCategoriesExclude EuGpsCoordinates { get; } = new PiiCategoriesExclude(EuGpsCoordinatesValue); + /// EU National Identification Number. + public static PiiCategoriesExclude EuNationalIdentificationNumber { get; } = new PiiCategoriesExclude(EuNationalIdentificationNumberValue); + /// EU Passport Number. + public static PiiCategoriesExclude EuPassportNumber { get; } = new PiiCategoriesExclude(EuPassportNumberValue); + /// EU Social Security Number. + public static PiiCategoriesExclude EuSocialSecurityNumber { get; } = new PiiCategoriesExclude(EuSocialSecurityNumberValue); + /// EU Tax Identification Number. + public static PiiCategoriesExclude EuTaxIdentificationNumber { get; } = new PiiCategoriesExclude(EuTaxIdentificationNumberValue); + /// FI European Health Number. + public static PiiCategoriesExclude FiEuropeanHealthNumber { get; } = new PiiCategoriesExclude(FiEuropeanHealthNumberValue); + /// FI National ID. + public static PiiCategoriesExclude FiNationalId { get; } = new PiiCategoriesExclude(FiNationalIdValue); + /// FI National ID V2. + public static PiiCategoriesExclude FiNationalIdV2 { get; } = new PiiCategoriesExclude(FiNationalIdV2Value); + /// FI Passport Number. + public static PiiCategoriesExclude FiPassportNumber { get; } = new PiiCategoriesExclude(FiPassportNumberValue); + /// FR Driver's License Number. + public static PiiCategoriesExclude FrDriversLicenseNumber { get; } = new PiiCategoriesExclude(FrDriversLicenseNumberValue); + /// FR Health Insurance Number. + public static PiiCategoriesExclude FrHealthInsuranceNumber { get; } = new PiiCategoriesExclude(FrHealthInsuranceNumberValue); + /// FR National ID. + public static PiiCategoriesExclude FrNationalId { get; } = new PiiCategoriesExclude(FrNationalIdValue); + /// FR Passport Number. + public static PiiCategoriesExclude FrPassportNumber { get; } = new PiiCategoriesExclude(FrPassportNumberValue); + /// FR Social Security Number. + public static PiiCategoriesExclude FrSocialSecurityNumber { get; } = new PiiCategoriesExclude(FrSocialSecurityNumberValue); + /// FR Tax Identification Number. + public static PiiCategoriesExclude FrTaxIdentificationNumber { get; } = new PiiCategoriesExclude(FrTaxIdentificationNumberValue); + /// FR Value Added Tax Number. + public static PiiCategoriesExclude FrValueAddedTaxNumber { get; } = new PiiCategoriesExclude(FrValueAddedTaxNumberValue); + /// DE Driver's License Number. + public static PiiCategoriesExclude DeDriversLicenseNumber { get; } = new PiiCategoriesExclude(DeDriversLicenseNumberValue); + /// DE Passport Number. + public static PiiCategoriesExclude DePassportNumber { get; } = new PiiCategoriesExclude(DePassportNumberValue); + /// DE Identity Card Number. + public static PiiCategoriesExclude DeIdentityCardNumber { get; } = new PiiCategoriesExclude(DeIdentityCardNumberValue); + /// DE Tax Identification Number. + public static PiiCategoriesExclude DeTaxIdentificationNumber { get; } = new PiiCategoriesExclude(DeTaxIdentificationNumberValue); + /// DE Value Added Number. + public static PiiCategoriesExclude DeValueAddedNumber { get; } = new PiiCategoriesExclude(DeValueAddedNumberValue); + /// GR National ID Card. + public static PiiCategoriesExclude GrNationalIdCard { get; } = new PiiCategoriesExclude(GrNationalIdCardValue); + /// GR National ID V2. + public static PiiCategoriesExclude GrNationalIdV2 { get; } = new PiiCategoriesExclude(GrNationalIdV2Value); + /// GR Tax Identification Number. + public static PiiCategoriesExclude GrTaxIdentificationNumber { get; } = new PiiCategoriesExclude(GrTaxIdentificationNumberValue); + /// HK Identity Card Number. + public static PiiCategoriesExclude HkIdentityCardNumber { get; } = new PiiCategoriesExclude(HkIdentityCardNumberValue); + /// HU Value Added Number. + public static PiiCategoriesExclude HuValueAddedNumber { get; } = new PiiCategoriesExclude(HuValueAddedNumberValue); + /// HU Personal Identification Number. + public static PiiCategoriesExclude HuPersonalIdentificationNumber { get; } = new PiiCategoriesExclude(HuPersonalIdentificationNumberValue); + /// HU Tax Identification Number. + public static PiiCategoriesExclude HuTaxIdentificationNumber { get; } = new PiiCategoriesExclude(HuTaxIdentificationNumberValue); + /// IN Permanent Account. + public static PiiCategoriesExclude InPermanentAccount { get; } = new PiiCategoriesExclude(InPermanentAccountValue); + /// IN Unique Identification Number. + public static PiiCategoriesExclude InUniqueIdentificationNumber { get; } = new PiiCategoriesExclude(InUniqueIdentificationNumberValue); + /// ID Identity Card Number. + public static PiiCategoriesExclude IdIdentityCardNumber { get; } = new PiiCategoriesExclude(IdIdentityCardNumberValue); + /// International Banking Account Number. + public static PiiCategoriesExclude InternationalBankingAccountNumber { get; } = new PiiCategoriesExclude(InternationalBankingAccountNumberValue); + /// IE Personal Public Service Number. + public static PiiCategoriesExclude IePersonalPublicServiceNumber { get; } = new PiiCategoriesExclude(IePersonalPublicServiceNumberValue); + /// IE Personal Public Service Number V2. + public static PiiCategoriesExclude IePersonalPublicServiceNumberV2 { get; } = new PiiCategoriesExclude(IePersonalPublicServiceNumberV2Value); + /// IL Bank Account Number. + public static PiiCategoriesExclude IlBankAccountNumber { get; } = new PiiCategoriesExclude(IlBankAccountNumberValue); + /// IL National ID. + public static PiiCategoriesExclude IlNationalId { get; } = new PiiCategoriesExclude(IlNationalIdValue); + /// IT Driver's License Number. + public static PiiCategoriesExclude ItDriversLicenseNumber { get; } = new PiiCategoriesExclude(ItDriversLicenseNumberValue); + /// IT Fiscal Code. + public static PiiCategoriesExclude ItFiscalCode { get; } = new PiiCategoriesExclude(ItFiscalCodeValue); + /// IT Value Added Tax Number. + public static PiiCategoriesExclude ItValueAddedTaxNumber { get; } = new PiiCategoriesExclude(ItValueAddedTaxNumberValue); + /// JP Bank Account Number. + public static PiiCategoriesExclude JpBankAccountNumber { get; } = new PiiCategoriesExclude(JpBankAccountNumberValue); + /// JP Driver's License Number. + public static PiiCategoriesExclude JpDriversLicenseNumber { get; } = new PiiCategoriesExclude(JpDriversLicenseNumberValue); + /// JP Passport Number. + public static PiiCategoriesExclude JpPassportNumber { get; } = new PiiCategoriesExclude(JpPassportNumberValue); + /// JP Resident Registration Number. + public static PiiCategoriesExclude JpResidentRegistrationNumber { get; } = new PiiCategoriesExclude(JpResidentRegistrationNumberValue); + /// JP Social Insurance Number. + public static PiiCategoriesExclude JpSocialInsuranceNumber { get; } = new PiiCategoriesExclude(JpSocialInsuranceNumberValue); + /// JP My Number Corporate. + public static PiiCategoriesExclude JpMyNumberCorporate { get; } = new PiiCategoriesExclude(JpMyNumberCorporateValue); + /// JP My Number Personal. + public static PiiCategoriesExclude JpMyNumberPersonal { get; } = new PiiCategoriesExclude(JpMyNumberPersonalValue); + /// JP Residence Card Number. + public static PiiCategoriesExclude JpResidenceCardNumber { get; } = new PiiCategoriesExclude(JpResidenceCardNumberValue); + /// LV Personal Code. + public static PiiCategoriesExclude LvPersonalCode { get; } = new PiiCategoriesExclude(LvPersonalCodeValue); + /// LT Personal Code. + public static PiiCategoriesExclude LtPersonalCode { get; } = new PiiCategoriesExclude(LtPersonalCodeValue); + /// LU National Identification Number Natural. + public static PiiCategoriesExclude LuNationalIdentificationNumberNatural { get; } = new PiiCategoriesExclude(LuNationalIdentificationNumberNaturalValue); + /// LU National Identification Number Non Natural. + public static PiiCategoriesExclude LuNationalIdentificationNumberNonNatural { get; } = new PiiCategoriesExclude(LuNationalIdentificationNumberNonNaturalValue); + /// MY Identity Card Number. + public static PiiCategoriesExclude MyIdentityCardNumber { get; } = new PiiCategoriesExclude(MyIdentityCardNumberValue); + /// MT Identity Card Number. + public static PiiCategoriesExclude MtIdentityCardNumber { get; } = new PiiCategoriesExclude(MtIdentityCardNumberValue); + /// MT Tax ID Number. + public static PiiCategoriesExclude MtTaxIdNumber { get; } = new PiiCategoriesExclude(MtTaxIdNumberValue); + /// NL Citizens Service Number. + public static PiiCategoriesExclude NlCitizensServiceNumber { get; } = new PiiCategoriesExclude(NlCitizensServiceNumberValue); + /// NL Citizens Service Number V2. + public static PiiCategoriesExclude NlCitizensServiceNumberV2 { get; } = new PiiCategoriesExclude(NlCitizensServiceNumberV2Value); + /// NL Tax Identification Number. + public static PiiCategoriesExclude NlTaxIdentificationNumber { get; } = new PiiCategoriesExclude(NlTaxIdentificationNumberValue); + /// NL Value Added Tax Number. + public static PiiCategoriesExclude NlValueAddedTaxNumber { get; } = new PiiCategoriesExclude(NlValueAddedTaxNumberValue); + /// NZ Bank Account Number. + public static PiiCategoriesExclude NzBankAccountNumber { get; } = new PiiCategoriesExclude(NzBankAccountNumberValue); + /// NZ Driver's License Number. + public static PiiCategoriesExclude NzDriversLicenseNumber { get; } = new PiiCategoriesExclude(NzDriversLicenseNumberValue); + /// NZ Inland Revenue Number. + public static PiiCategoriesExclude NzInlandRevenueNumber { get; } = new PiiCategoriesExclude(NzInlandRevenueNumberValue); + /// NZ Ministry Of Health Number. + public static PiiCategoriesExclude NzMinistryOfHealthNumber { get; } = new PiiCategoriesExclude(NzMinistryOfHealthNumberValue); + /// NZ Social Welfare Number. + public static PiiCategoriesExclude NzSocialWelfareNumber { get; } = new PiiCategoriesExclude(NzSocialWelfareNumberValue); + /// NO Identity Number. + public static PiiCategoriesExclude NoIdentityNumber { get; } = new PiiCategoriesExclude(NoIdentityNumberValue); + /// PH Unified Multi Purpose ID Number. + public static PiiCategoriesExclude PhUnifiedMultiPurposeIdNumber { get; } = new PiiCategoriesExclude(PhUnifiedMultiPurposeIdNumberValue); + /// PL Identity Card. + public static PiiCategoriesExclude PlIdentityCard { get; } = new PiiCategoriesExclude(PlIdentityCardValue); + /// PL National ID. + public static PiiCategoriesExclude PlNationalId { get; } = new PiiCategoriesExclude(PlNationalIdValue); + /// PL National ID V2. + public static PiiCategoriesExclude PlNationalIdV2 { get; } = new PiiCategoriesExclude(PlNationalIdV2Value); + /// PL Passport Number. + public static PiiCategoriesExclude PlPassportNumber { get; } = new PiiCategoriesExclude(PlPassportNumberValue); + /// PL Tax Identification Number. + public static PiiCategoriesExclude PlTaxIdentificationNumber { get; } = new PiiCategoriesExclude(PlTaxIdentificationNumberValue); + /// PL REGON Number. + public static PiiCategoriesExclude PlRegonNumber { get; } = new PiiCategoriesExclude(PlRegonNumberValue); + /// PT Citizen Card Number. + public static PiiCategoriesExclude PtCitizenCardNumber { get; } = new PiiCategoriesExclude(PtCitizenCardNumberValue); + /// PT Citizen Card Number V2. + public static PiiCategoriesExclude PtCitizenCardNumberV2 { get; } = new PiiCategoriesExclude(PtCitizenCardNumberV2Value); + /// PT Tax Identification Number. + public static PiiCategoriesExclude PtTaxIdentificationNumber { get; } = new PiiCategoriesExclude(PtTaxIdentificationNumberValue); + /// RO Personal Numerical Code. + public static PiiCategoriesExclude RoPersonalNumericalCode { get; } = new PiiCategoriesExclude(RoPersonalNumericalCodeValue); + /// RU Passport Number Domestic. + public static PiiCategoriesExclude RuPassportNumberDomestic { get; } = new PiiCategoriesExclude(RuPassportNumberDomesticValue); + /// RU Passport Number International. + public static PiiCategoriesExclude RuPassportNumberInternational { get; } = new PiiCategoriesExclude(RuPassportNumberInternationalValue); + /// SA National ID. + public static PiiCategoriesExclude SaNationalId { get; } = new PiiCategoriesExclude(SaNationalIdValue); + /// SG National Registration Identity Card Number. + public static PiiCategoriesExclude SgNationalRegistrationIdentityCardNumber { get; } = new PiiCategoriesExclude(SgNationalRegistrationIdentityCardNumberValue); + /// SK Personal Number. + public static PiiCategoriesExclude SkPersonalNumber { get; } = new PiiCategoriesExclude(SkPersonalNumberValue); + /// SI Tax Identification Number. + public static PiiCategoriesExclude SiTaxIdentificationNumber { get; } = new PiiCategoriesExclude(SiTaxIdentificationNumberValue); + /// SI Unique Master Citizen Number. + public static PiiCategoriesExclude SiUniqueMasterCitizenNumber { get; } = new PiiCategoriesExclude(SiUniqueMasterCitizenNumberValue); + /// ZA Identification Number. + public static PiiCategoriesExclude ZaIdentificationNumber { get; } = new PiiCategoriesExclude(ZaIdentificationNumberValue); + /// KR Resident Registration Number. + public static PiiCategoriesExclude KrResidentRegistrationNumber { get; } = new PiiCategoriesExclude(KrResidentRegistrationNumberValue); + /// ES DNI. + public static PiiCategoriesExclude EsDni { get; } = new PiiCategoriesExclude(EsDniValue); + /// ES Social Security Number. + public static PiiCategoriesExclude EsSocialSecurityNumber { get; } = new PiiCategoriesExclude(EsSocialSecurityNumberValue); + /// ES Tax Identification Number. + public static PiiCategoriesExclude EsTaxIdentificationNumber { get; } = new PiiCategoriesExclude(EsTaxIdentificationNumberValue); + /// SQL Server Connection String. + public static PiiCategoriesExclude SqlServerConnectionString { get; } = new PiiCategoriesExclude(SqlServerConnectionStringValue); + /// SE National ID. + public static PiiCategoriesExclude SeNationalId { get; } = new PiiCategoriesExclude(SeNationalIdValue); + /// SE National ID V2. + public static PiiCategoriesExclude SeNationalIdV2 { get; } = new PiiCategoriesExclude(SeNationalIdV2Value); + /// SE Passport Number. + public static PiiCategoriesExclude SePassportNumber { get; } = new PiiCategoriesExclude(SePassportNumberValue); + /// SE Tax Identification Number. + public static PiiCategoriesExclude SeTaxIdentificationNumber { get; } = new PiiCategoriesExclude(SeTaxIdentificationNumberValue); + /// SWIFT Code. + public static PiiCategoriesExclude SwiftCode { get; } = new PiiCategoriesExclude(SwiftCodeValue); + /// CH Social Security Number. + public static PiiCategoriesExclude ChSocialSecurityNumber { get; } = new PiiCategoriesExclude(ChSocialSecurityNumberValue); + /// TW National ID. + public static PiiCategoriesExclude TwNationalId { get; } = new PiiCategoriesExclude(TwNationalIdValue); + /// TW Passport Number. + public static PiiCategoriesExclude TwPassportNumber { get; } = new PiiCategoriesExclude(TwPassportNumberValue); + /// TW Resident Certificate. + public static PiiCategoriesExclude TwResidentCertificate { get; } = new PiiCategoriesExclude(TwResidentCertificateValue); + /// TH Population Identification Code. + public static PiiCategoriesExclude ThPopulationIdentificationCode { get; } = new PiiCategoriesExclude(ThPopulationIdentificationCodeValue); + /// TR National Identification Number. + public static PiiCategoriesExclude TrNationalIdentificationNumber { get; } = new PiiCategoriesExclude(TrNationalIdentificationNumberValue); + /// UK Driver's License Number. + public static PiiCategoriesExclude UkDriversLicenseNumber { get; } = new PiiCategoriesExclude(UkDriversLicenseNumberValue); + /// UK Electoral Roll Number. + public static PiiCategoriesExclude UkElectoralRollNumber { get; } = new PiiCategoriesExclude(UkElectoralRollNumberValue); + /// UK National Health Number. + public static PiiCategoriesExclude UkNationalHealthNumber { get; } = new PiiCategoriesExclude(UkNationalHealthNumberValue); + /// UK National Insurance Number. + public static PiiCategoriesExclude UkNationalInsuranceNumber { get; } = new PiiCategoriesExclude(UkNationalInsuranceNumberValue); + /// UK Unique Taxpayer Number. + public static PiiCategoriesExclude UkUniqueTaxpayerNumber { get; } = new PiiCategoriesExclude(UkUniqueTaxpayerNumberValue); + /// US UK Passport Number. + public static PiiCategoriesExclude UsUkPassportNumber { get; } = new PiiCategoriesExclude(UsUkPassportNumberValue); + /// US Bank Account Number. + public static PiiCategoriesExclude UsBankAccountNumber { get; } = new PiiCategoriesExclude(UsBankAccountNumberValue); + /// US Driver's License Number. + public static PiiCategoriesExclude UsDriversLicenseNumber { get; } = new PiiCategoriesExclude(UsDriversLicenseNumberValue); + /// US Individual Taxpayer Identification. + public static PiiCategoriesExclude UsIndividualTaxpayerIdentification { get; } = new PiiCategoriesExclude(UsIndividualTaxpayerIdentificationValue); + /// US Social Security Number. + public static PiiCategoriesExclude UsSocialSecurityNumber { get; } = new PiiCategoriesExclude(UsSocialSecurityNumberValue); + /// UA Passport Number Domestic. + public static PiiCategoriesExclude UaPassportNumberDomestic { get; } = new PiiCategoriesExclude(UaPassportNumberDomesticValue); + /// UA Passport Number International. + public static PiiCategoriesExclude UaPassportNumberInternational { get; } = new PiiCategoriesExclude(UaPassportNumberInternationalValue); + /// Organization. + public static PiiCategoriesExclude Organization { get; } = new PiiCategoriesExclude(OrganizationValue); + /// Email. + public static PiiCategoriesExclude Email { get; } = new PiiCategoriesExclude(EmailValue); + /// URL. + public static PiiCategoriesExclude URL { get; } = new PiiCategoriesExclude(URLValue); + /// Age. + public static PiiCategoriesExclude Age { get; } = new PiiCategoriesExclude(AgeValue); + /// Phone Number. + public static PiiCategoriesExclude PhoneNumber { get; } = new PiiCategoriesExclude(PhoneNumberValue); + /// IP Address. + public static PiiCategoriesExclude IPAddress { get; } = new PiiCategoriesExclude(IPAddressValue); + /// Date. + public static PiiCategoriesExclude Date { get; } = new PiiCategoriesExclude(DateValue); + /// Person. + public static PiiCategoriesExclude Person { get; } = new PiiCategoriesExclude(PersonValue); + /// Address. + public static PiiCategoriesExclude Address { get; } = new PiiCategoriesExclude(AddressValue); + /// Determines if two values are the same. + public static bool operator ==(PiiCategoriesExclude left, PiiCategoriesExclude right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PiiCategoriesExclude left, PiiCategoriesExclude right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PiiCategoriesExclude(string value) => new PiiCategoriesExclude(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PiiCategoriesExclude other && Equals(other); + /// + public bool Equals(PiiCategoriesExclude 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiCategory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiCategory.cs new file mode 100644 index 000000000000..2119bb96b16d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiCategory.cs @@ -0,0 +1,564 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// (Optional) describes the PII categories to return. + public readonly partial struct PiiCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PiiCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AbaRoutingNumberValue = "ABARoutingNumber"; + private const string ArNationalIdentityNumberValue = "ARNationalIdentityNumber"; + private const string AuBankAccountNumberValue = "AUBankAccountNumber"; + private const string AuDriversLicenseNumberValue = "AUDriversLicenseNumber"; + private const string AuMedicalAccountNumberValue = "AUMedicalAccountNumber"; + private const string AuPassportNumberValue = "AUPassportNumber"; + private const string AuTaxFileNumberValue = "AUTaxFileNumber"; + private const string AuBusinessNumberValue = "AUBusinessNumber"; + private const string AuCompanyNumberValue = "AUCompanyNumber"; + private const string AtIdentityCardValue = "ATIdentityCard"; + private const string AtTaxIdentificationNumberValue = "ATTaxIdentificationNumber"; + private const string AtValueAddedTaxNumberValue = "ATValueAddedTaxNumber"; + private const string AzureDocumentDbauthKeyValue = "AzureDocumentDBAuthKey"; + private const string AzureIaasDatabaseConnectionAndSqlStringValue = "AzureIAASDatabaseConnectionAndSQLString"; + private const string AzureIoTConnectionStringValue = "AzureIoTConnectionString"; + private const string AzurePublishSettingPasswordValue = "AzurePublishSettingPassword"; + private const string AzureRedisCacheStringValue = "AzureRedisCacheString"; + private const string AzureSasValue = "AzureSAS"; + private const string AzureServiceBusStringValue = "AzureServiceBusString"; + private const string AzureStorageAccountKeyValue = "AzureStorageAccountKey"; + private const string AzureStorageAccountGenericValue = "AzureStorageAccountGeneric"; + private const string BeNationalNumberValue = "BENationalNumber"; + private const string BeNationalNumberV2Value = "BENationalNumberV2"; + private const string BeValueAddedTaxNumberValue = "BEValueAddedTaxNumber"; + private const string BrCpfNumberValue = "BRCPFNumber"; + private const string BrLegalEntityNumberValue = "BRLegalEntityNumber"; + private const string BrNationalIdRgValue = "BRNationalIDRG"; + private const string BgUniformCivilNumberValue = "BGUniformCivilNumber"; + private const string CaBankAccountNumberValue = "CABankAccountNumber"; + private const string CaDriversLicenseNumberValue = "CADriversLicenseNumber"; + private const string CaHealthServiceNumberValue = "CAHealthServiceNumber"; + private const string CaPassportNumberValue = "CAPassportNumber"; + private const string CaPersonalHealthIdentificationValue = "CAPersonalHealthIdentification"; + private const string CaSocialInsuranceNumberValue = "CASocialInsuranceNumber"; + private const string ClIdentityCardNumberValue = "CLIdentityCardNumber"; + private const string CnResidentIdentityCardNumberValue = "CNResidentIdentityCardNumber"; + private const string CreditCardNumberValue = "CreditCardNumber"; + private const string HrIdentityCardNumberValue = "HRIdentityCardNumber"; + private const string HrNationalIdNumberValue = "HRNationalIDNumber"; + private const string HrPersonalIdentificationNumberValue = "HRPersonalIdentificationNumber"; + private const string HrPersonalIdentificationOIBNumberV2Value = "HRPersonalIdentificationOIBNumberV2"; + private const string CyIdentityCardValue = "CYIdentityCard"; + private const string CyTaxIdentificationNumberValue = "CYTaxIdentificationNumber"; + private const string CzPersonalIdentityNumberValue = "CZPersonalIdentityNumber"; + private const string CzPersonalIdentityV2Value = "CZPersonalIdentityV2"; + private const string DkPersonalIdentificationNumberValue = "DKPersonalIdentificationNumber"; + private const string DkPersonalIdentificationV2Value = "DKPersonalIdentificationV2"; + private const string DrugEnforcementAgencyNumberValue = "DrugEnforcementAgencyNumber"; + private const string EePersonalIdentificationCodeValue = "EEPersonalIdentificationCode"; + private const string EuDebitCardNumberValue = "EUDebitCardNumber"; + private const string EuDriversLicenseNumberValue = "EUDriversLicenseNumber"; + private const string EuGpsCoordinatesValue = "EUGPSCoordinates"; + private const string EuNationalIdentificationNumberValue = "EUNationalIdentificationNumber"; + private const string EuPassportNumberValue = "EUPassportNumber"; + private const string EuSocialSecurityNumberValue = "EUSocialSecurityNumber"; + private const string EuTaxIdentificationNumberValue = "EUTaxIdentificationNumber"; + private const string FiEuropeanHealthNumberValue = "FIEuropeanHealthNumber"; + private const string FiNationalIdValue = "FINationalID"; + private const string FiNationalIdV2Value = "FINationalIDV2"; + private const string FiPassportNumberValue = "FIPassportNumber"; + private const string FrDriversLicenseNumberValue = "FRDriversLicenseNumber"; + private const string FrHealthInsuranceNumberValue = "FRHealthInsuranceNumber"; + private const string FrNationalIdValue = "FRNationalID"; + private const string FrPassportNumberValue = "FRPassportNumber"; + private const string FrSocialSecurityNumberValue = "FRSocialSecurityNumber"; + private const string FrTaxIdentificationNumberValue = "FRTaxIdentificationNumber"; + private const string FrValueAddedTaxNumberValue = "FRValueAddedTaxNumber"; + private const string DeDriversLicenseNumberValue = "DEDriversLicenseNumber"; + private const string DePassportNumberValue = "DEPassportNumber"; + private const string DeIdentityCardNumberValue = "DEIdentityCardNumber"; + private const string DeTaxIdentificationNumberValue = "DETaxIdentificationNumber"; + private const string DeValueAddedNumberValue = "DEValueAddedNumber"; + private const string GrNationalIdCardValue = "GRNationalIDCard"; + private const string GrNationalIdV2Value = "GRNationalIDV2"; + private const string GrTaxIdentificationNumberValue = "GRTaxIdentificationNumber"; + private const string HkIdentityCardNumberValue = "HKIdentityCardNumber"; + private const string HuValueAddedNumberValue = "HUValueAddedNumber"; + private const string HuPersonalIdentificationNumberValue = "HUPersonalIdentificationNumber"; + private const string HuTaxIdentificationNumberValue = "HUTaxIdentificationNumber"; + private const string InPermanentAccountValue = "INPermanentAccount"; + private const string InUniqueIdentificationNumberValue = "INUniqueIdentificationNumber"; + private const string IdIdentityCardNumberValue = "IDIdentityCardNumber"; + private const string InternationalBankingAccountNumberValue = "InternationalBankingAccountNumber"; + private const string IePersonalPublicServiceNumberValue = "IEPersonalPublicServiceNumber"; + private const string IePersonalPublicServiceNumberV2Value = "IEPersonalPublicServiceNumberV2"; + private const string IlBankAccountNumberValue = "ILBankAccountNumber"; + private const string IlNationalIdValue = "ILNationalID"; + private const string ItDriversLicenseNumberValue = "ITDriversLicenseNumber"; + private const string ItFiscalCodeValue = "ITFiscalCode"; + private const string ItValueAddedTaxNumberValue = "ITValueAddedTaxNumber"; + private const string JpBankAccountNumberValue = "JPBankAccountNumber"; + private const string JpDriversLicenseNumberValue = "JPDriversLicenseNumber"; + private const string JpPassportNumberValue = "JPPassportNumber"; + private const string JpResidentRegistrationNumberValue = "JPResidentRegistrationNumber"; + private const string JpSocialInsuranceNumberValue = "JPSocialInsuranceNumber"; + private const string JpMyNumberCorporateValue = "JPMyNumberCorporate"; + private const string JpMyNumberPersonalValue = "JPMyNumberPersonal"; + private const string JpResidenceCardNumberValue = "JPResidenceCardNumber"; + private const string LvPersonalCodeValue = "LVPersonalCode"; + private const string LtPersonalCodeValue = "LTPersonalCode"; + private const string LuNationalIdentificationNumberNaturalValue = "LUNationalIdentificationNumberNatural"; + private const string LuNationalIdentificationNumberNonNaturalValue = "LUNationalIdentificationNumberNonNatural"; + private const string MyIdentityCardNumberValue = "MYIdentityCardNumber"; + private const string MtIdentityCardNumberValue = "MTIdentityCardNumber"; + private const string MtTaxIdNumberValue = "MTTaxIDNumber"; + private const string NlCitizensServiceNumberValue = "NLCitizensServiceNumber"; + private const string NlCitizensServiceNumberV2Value = "NLCitizensServiceNumberV2"; + private const string NlTaxIdentificationNumberValue = "NLTaxIdentificationNumber"; + private const string NlValueAddedTaxNumberValue = "NLValueAddedTaxNumber"; + private const string NzBankAccountNumberValue = "NZBankAccountNumber"; + private const string NzDriversLicenseNumberValue = "NZDriversLicenseNumber"; + private const string NzInlandRevenueNumberValue = "NZInlandRevenueNumber"; + private const string NzMinistryOfHealthNumberValue = "NZMinistryOfHealthNumber"; + private const string NzSocialWelfareNumberValue = "NZSocialWelfareNumber"; + private const string NoIdentityNumberValue = "NOIdentityNumber"; + private const string PhUnifiedMultiPurposeIdNumberValue = "PHUnifiedMultiPurposeIDNumber"; + private const string PlIdentityCardValue = "PLIdentityCard"; + private const string PlNationalIdValue = "PLNationalID"; + private const string PlNationalIdV2Value = "PLNationalIDV2"; + private const string PlPassportNumberValue = "PLPassportNumber"; + private const string PlTaxIdentificationNumberValue = "PLTaxIdentificationNumber"; + private const string PlRegonNumberValue = "PLREGONNumber"; + private const string PtCitizenCardNumberValue = "PTCitizenCardNumber"; + private const string PtCitizenCardNumberV2Value = "PTCitizenCardNumberV2"; + private const string PtTaxIdentificationNumberValue = "PTTaxIdentificationNumber"; + private const string RoPersonalNumericalCodeValue = "ROPersonalNumericalCode"; + private const string RuPassportNumberDomesticValue = "RUPassportNumberDomestic"; + private const string RuPassportNumberInternationalValue = "RUPassportNumberInternational"; + private const string SaNationalIdValue = "SANationalID"; + private const string SgNationalRegistrationIdentityCardNumberValue = "SGNationalRegistrationIdentityCardNumber"; + private const string SkPersonalNumberValue = "SKPersonalNumber"; + private const string SiTaxIdentificationNumberValue = "SITaxIdentificationNumber"; + private const string SiUniqueMasterCitizenNumberValue = "SIUniqueMasterCitizenNumber"; + private const string ZaIdentificationNumberValue = "ZAIdentificationNumber"; + private const string KrResidentRegistrationNumberValue = "KRResidentRegistrationNumber"; + private const string EsDniValue = "ESDNI"; + private const string EsSocialSecurityNumberValue = "ESSocialSecurityNumber"; + private const string EsTaxIdentificationNumberValue = "ESTaxIdentificationNumber"; + private const string SqlServerConnectionStringValue = "SQLServerConnectionString"; + private const string SeNationalIdValue = "SENationalID"; + private const string SeNationalIdV2Value = "SENationalIDV2"; + private const string SePassportNumberValue = "SEPassportNumber"; + private const string SeTaxIdentificationNumberValue = "SETaxIdentificationNumber"; + private const string SwiftCodeValue = "SWIFTCode"; + private const string ChSocialSecurityNumberValue = "CHSocialSecurityNumber"; + private const string TwNationalIdValue = "TWNationalID"; + private const string TwPassportNumberValue = "TWPassportNumber"; + private const string TwResidentCertificateValue = "TWResidentCertificate"; + private const string ThPopulationIdentificationCodeValue = "THPopulationIdentificationCode"; + private const string TrNationalIdentificationNumberValue = "TRNationalIdentificationNumber"; + private const string UkDriversLicenseNumberValue = "UKDriversLicenseNumber"; + private const string UkElectoralRollNumberValue = "UKElectoralRollNumber"; + private const string UkNationalHealthNumberValue = "UKNationalHealthNumber"; + private const string UkNationalInsuranceNumberValue = "UKNationalInsuranceNumber"; + private const string UkUniqueTaxpayerNumberValue = "UKUniqueTaxpayerNumber"; + private const string UsUkPassportNumberValue = "USUKPassportNumber"; + private const string UsBankAccountNumberValue = "USBankAccountNumber"; + private const string UsDriversLicenseNumberValue = "USDriversLicenseNumber"; + private const string UsIndividualTaxpayerIdentificationValue = "USIndividualTaxpayerIdentification"; + private const string UsSocialSecurityNumberValue = "USSocialSecurityNumber"; + private const string UaPassportNumberDomesticValue = "UAPassportNumberDomestic"; + private const string UaPassportNumberInternationalValue = "UAPassportNumberInternational"; + private const string OrganizationValue = "Organization"; + private const string EmailValue = "Email"; + private const string URLValue = "URL"; + private const string AgeValue = "Age"; + private const string PhoneNumberValue = "PhoneNumber"; + private const string IPAddressValue = "IPAddress"; + private const string DateValue = "Date"; + private const string PersonValue = "Person"; + private const string AddressValue = "Address"; + private const string AllValue = "All"; + private const string DefaultValue = "Default"; + + /// ABA Routing number. + public static PiiCategory AbaRoutingNumber { get; } = new PiiCategory(AbaRoutingNumberValue); + /// AR National Identity Number. + public static PiiCategory ArNationalIdentityNumber { get; } = new PiiCategory(ArNationalIdentityNumberValue); + /// AT Identity Card. + public static PiiCategory AuBankAccountNumber { get; } = new PiiCategory(AuBankAccountNumberValue); + /// AU Driver's License Number. + public static PiiCategory AuDriversLicenseNumber { get; } = new PiiCategory(AuDriversLicenseNumberValue); + /// AU Medical Account Number. + public static PiiCategory AuMedicalAccountNumber { get; } = new PiiCategory(AuMedicalAccountNumberValue); + /// AU Passport Number. + public static PiiCategory AuPassportNumber { get; } = new PiiCategory(AuPassportNumberValue); + /// AU Tax File Number. + public static PiiCategory AuTaxFileNumber { get; } = new PiiCategory(AuTaxFileNumberValue); + /// AU Business Number. + public static PiiCategory AuBusinessNumber { get; } = new PiiCategory(AuBusinessNumberValue); + /// AU Company Number. + public static PiiCategory AuCompanyNumber { get; } = new PiiCategory(AuCompanyNumberValue); + /// AT Identity Card. + public static PiiCategory AtIdentityCard { get; } = new PiiCategory(AtIdentityCardValue); + /// AT Tax Identification Number. + public static PiiCategory AtTaxIdentificationNumber { get; } = new PiiCategory(AtTaxIdentificationNumberValue); + /// AT Value Added Tax Number. + public static PiiCategory AtValueAddedTaxNumber { get; } = new PiiCategory(AtValueAddedTaxNumberValue); + /// Azure Document DB Auth Key. + public static PiiCategory AzureDocumentDbauthKey { get; } = new PiiCategory(AzureDocumentDbauthKeyValue); + /// Azure IAAS Database Connection And SQL String. + public static PiiCategory AzureIaasDatabaseConnectionAndSqlString { get; } = new PiiCategory(AzureIaasDatabaseConnectionAndSqlStringValue); + /// Azure IoT Connection String. + public static PiiCategory AzureIoTConnectionString { get; } = new PiiCategory(AzureIoTConnectionStringValue); + /// Azure Publish Setting Password. + public static PiiCategory AzurePublishSettingPassword { get; } = new PiiCategory(AzurePublishSettingPasswordValue); + /// Azure Redis Cache String. + public static PiiCategory AzureRedisCacheString { get; } = new PiiCategory(AzureRedisCacheStringValue); + /// Azure SAS. + public static PiiCategory AzureSas { get; } = new PiiCategory(AzureSasValue); + /// Azure Service Bus String. + public static PiiCategory AzureServiceBusString { get; } = new PiiCategory(AzureServiceBusStringValue); + /// Azure Storage Account Key. + public static PiiCategory AzureStorageAccountKey { get; } = new PiiCategory(AzureStorageAccountKeyValue); + /// Azure Storage Account Generic. + public static PiiCategory AzureStorageAccountGeneric { get; } = new PiiCategory(AzureStorageAccountGenericValue); + /// BE National Number. + public static PiiCategory BeNationalNumber { get; } = new PiiCategory(BeNationalNumberValue); + /// BE National Number V2. + public static PiiCategory BeNationalNumberV2 { get; } = new PiiCategory(BeNationalNumberV2Value); + /// BE Value Added Tax Number. + public static PiiCategory BeValueAddedTaxNumber { get; } = new PiiCategory(BeValueAddedTaxNumberValue); + /// BR CPF Number. + public static PiiCategory BrCpfNumber { get; } = new PiiCategory(BrCpfNumberValue); + /// BR Legal Entity Number. + public static PiiCategory BrLegalEntityNumber { get; } = new PiiCategory(BrLegalEntityNumberValue); + /// BR National ID RG. + public static PiiCategory BrNationalIdRg { get; } = new PiiCategory(BrNationalIdRgValue); + /// BG Uniform Civil Number. + public static PiiCategory BgUniformCivilNumber { get; } = new PiiCategory(BgUniformCivilNumberValue); + /// CA Bank Account Number. + public static PiiCategory CaBankAccountNumber { get; } = new PiiCategory(CaBankAccountNumberValue); + /// CA Driver's License Number. + public static PiiCategory CaDriversLicenseNumber { get; } = new PiiCategory(CaDriversLicenseNumberValue); + /// CA Health Service Number. + public static PiiCategory CaHealthServiceNumber { get; } = new PiiCategory(CaHealthServiceNumberValue); + /// CA Passport Number. + public static PiiCategory CaPassportNumber { get; } = new PiiCategory(CaPassportNumberValue); + /// CA Personal Health Identification. + public static PiiCategory CaPersonalHealthIdentification { get; } = new PiiCategory(CaPersonalHealthIdentificationValue); + /// CA Social Insurance Number. + public static PiiCategory CaSocialInsuranceNumber { get; } = new PiiCategory(CaSocialInsuranceNumberValue); + /// CL Identity Card Number. + public static PiiCategory ClIdentityCardNumber { get; } = new PiiCategory(ClIdentityCardNumberValue); + /// CN Resident Identity Card Number. + public static PiiCategory CnResidentIdentityCardNumber { get; } = new PiiCategory(CnResidentIdentityCardNumberValue); + /// Credit Card Number. + public static PiiCategory CreditCardNumber { get; } = new PiiCategory(CreditCardNumberValue); + /// HR Identity Card Number. + public static PiiCategory HrIdentityCardNumber { get; } = new PiiCategory(HrIdentityCardNumberValue); + /// HR National ID Number. + public static PiiCategory HrNationalIdNumber { get; } = new PiiCategory(HrNationalIdNumberValue); + /// HR Personal Identification Number. + public static PiiCategory HrPersonalIdentificationNumber { get; } = new PiiCategory(HrPersonalIdentificationNumberValue); + /// HR Personal Identification OIB Number V2. + public static PiiCategory HrPersonalIdentificationOIBNumberV2 { get; } = new PiiCategory(HrPersonalIdentificationOIBNumberV2Value); + /// CY Identity Card. + public static PiiCategory CyIdentityCard { get; } = new PiiCategory(CyIdentityCardValue); + /// CY Tax Identification Number. + public static PiiCategory CyTaxIdentificationNumber { get; } = new PiiCategory(CyTaxIdentificationNumberValue); + /// CZ Personal Identity Number. + public static PiiCategory CzPersonalIdentityNumber { get; } = new PiiCategory(CzPersonalIdentityNumberValue); + /// CZ Personal Identity V2. + public static PiiCategory CzPersonalIdentityV2 { get; } = new PiiCategory(CzPersonalIdentityV2Value); + /// DK Personal Identification Number. + public static PiiCategory DkPersonalIdentificationNumber { get; } = new PiiCategory(DkPersonalIdentificationNumberValue); + /// DK Personal Identification V2. + public static PiiCategory DkPersonalIdentificationV2 { get; } = new PiiCategory(DkPersonalIdentificationV2Value); + /// Drug Enforcement Agency Number. + public static PiiCategory DrugEnforcementAgencyNumber { get; } = new PiiCategory(DrugEnforcementAgencyNumberValue); + /// EE Personal Identification Code. + public static PiiCategory EePersonalIdentificationCode { get; } = new PiiCategory(EePersonalIdentificationCodeValue); + /// EU Debit Card Number. + public static PiiCategory EuDebitCardNumber { get; } = new PiiCategory(EuDebitCardNumberValue); + /// EU Driver's License Number. + public static PiiCategory EuDriversLicenseNumber { get; } = new PiiCategory(EuDriversLicenseNumberValue); + /// EU GPS Coordinates. + public static PiiCategory EuGpsCoordinates { get; } = new PiiCategory(EuGpsCoordinatesValue); + /// EU National Identification Number. + public static PiiCategory EuNationalIdentificationNumber { get; } = new PiiCategory(EuNationalIdentificationNumberValue); + /// EU Passport Number. + public static PiiCategory EuPassportNumber { get; } = new PiiCategory(EuPassportNumberValue); + /// EU Social Security Number. + public static PiiCategory EuSocialSecurityNumber { get; } = new PiiCategory(EuSocialSecurityNumberValue); + /// EU Tax Identification Number. + public static PiiCategory EuTaxIdentificationNumber { get; } = new PiiCategory(EuTaxIdentificationNumberValue); + /// FI European Health Number. + public static PiiCategory FiEuropeanHealthNumber { get; } = new PiiCategory(FiEuropeanHealthNumberValue); + /// FI National ID. + public static PiiCategory FiNationalId { get; } = new PiiCategory(FiNationalIdValue); + /// FI National ID V2. + public static PiiCategory FiNationalIdV2 { get; } = new PiiCategory(FiNationalIdV2Value); + /// FI Passport Number. + public static PiiCategory FiPassportNumber { get; } = new PiiCategory(FiPassportNumberValue); + /// FR Driver's License Number. + public static PiiCategory FrDriversLicenseNumber { get; } = new PiiCategory(FrDriversLicenseNumberValue); + /// FR Health Insurance Number. + public static PiiCategory FrHealthInsuranceNumber { get; } = new PiiCategory(FrHealthInsuranceNumberValue); + /// FR National ID. + public static PiiCategory FrNationalId { get; } = new PiiCategory(FrNationalIdValue); + /// FR Passport Number. + public static PiiCategory FrPassportNumber { get; } = new PiiCategory(FrPassportNumberValue); + /// FR Social Security Number. + public static PiiCategory FrSocialSecurityNumber { get; } = new PiiCategory(FrSocialSecurityNumberValue); + /// FR Tax Identification Number. + public static PiiCategory FrTaxIdentificationNumber { get; } = new PiiCategory(FrTaxIdentificationNumberValue); + /// FR Value Added Tax Number. + public static PiiCategory FrValueAddedTaxNumber { get; } = new PiiCategory(FrValueAddedTaxNumberValue); + /// DE Driver's License Number. + public static PiiCategory DeDriversLicenseNumber { get; } = new PiiCategory(DeDriversLicenseNumberValue); + /// DE Passport Number. + public static PiiCategory DePassportNumber { get; } = new PiiCategory(DePassportNumberValue); + /// DE Identity Card Number. + public static PiiCategory DeIdentityCardNumber { get; } = new PiiCategory(DeIdentityCardNumberValue); + /// DE Tax Identification Number. + public static PiiCategory DeTaxIdentificationNumber { get; } = new PiiCategory(DeTaxIdentificationNumberValue); + /// DE Value Added Number. + public static PiiCategory DeValueAddedNumber { get; } = new PiiCategory(DeValueAddedNumberValue); + /// GR National ID Card. + public static PiiCategory GrNationalIdCard { get; } = new PiiCategory(GrNationalIdCardValue); + /// GR National ID V2. + public static PiiCategory GrNationalIdV2 { get; } = new PiiCategory(GrNationalIdV2Value); + /// GR Tax Identification Number. + public static PiiCategory GrTaxIdentificationNumber { get; } = new PiiCategory(GrTaxIdentificationNumberValue); + /// HK Identity Card Number. + public static PiiCategory HkIdentityCardNumber { get; } = new PiiCategory(HkIdentityCardNumberValue); + /// HU Value Added Number. + public static PiiCategory HuValueAddedNumber { get; } = new PiiCategory(HuValueAddedNumberValue); + /// HU Personal Identification Number. + public static PiiCategory HuPersonalIdentificationNumber { get; } = new PiiCategory(HuPersonalIdentificationNumberValue); + /// HU Tax Identification Number. + public static PiiCategory HuTaxIdentificationNumber { get; } = new PiiCategory(HuTaxIdentificationNumberValue); + /// IN Permanent Account. + public static PiiCategory InPermanentAccount { get; } = new PiiCategory(InPermanentAccountValue); + /// IN Unique Identification Number. + public static PiiCategory InUniqueIdentificationNumber { get; } = new PiiCategory(InUniqueIdentificationNumberValue); + /// ID Identity Card Number. + public static PiiCategory IdIdentityCardNumber { get; } = new PiiCategory(IdIdentityCardNumberValue); + /// International Banking Account Number. + public static PiiCategory InternationalBankingAccountNumber { get; } = new PiiCategory(InternationalBankingAccountNumberValue); + /// IE Personal Public Service Number. + public static PiiCategory IePersonalPublicServiceNumber { get; } = new PiiCategory(IePersonalPublicServiceNumberValue); + /// IE Personal Public Service Number V2. + public static PiiCategory IePersonalPublicServiceNumberV2 { get; } = new PiiCategory(IePersonalPublicServiceNumberV2Value); + /// IL Bank Account Number. + public static PiiCategory IlBankAccountNumber { get; } = new PiiCategory(IlBankAccountNumberValue); + /// IL National ID. + public static PiiCategory IlNationalId { get; } = new PiiCategory(IlNationalIdValue); + /// IT Driver's License Number. + public static PiiCategory ItDriversLicenseNumber { get; } = new PiiCategory(ItDriversLicenseNumberValue); + /// IT Fiscal Code. + public static PiiCategory ItFiscalCode { get; } = new PiiCategory(ItFiscalCodeValue); + /// IT Value Added Tax Number. + public static PiiCategory ItValueAddedTaxNumber { get; } = new PiiCategory(ItValueAddedTaxNumberValue); + /// JP Bank Account Number. + public static PiiCategory JpBankAccountNumber { get; } = new PiiCategory(JpBankAccountNumberValue); + /// JP Driver's License Number. + public static PiiCategory JpDriversLicenseNumber { get; } = new PiiCategory(JpDriversLicenseNumberValue); + /// JP Passport Number. + public static PiiCategory JpPassportNumber { get; } = new PiiCategory(JpPassportNumberValue); + /// JP Resident Registration Number. + public static PiiCategory JpResidentRegistrationNumber { get; } = new PiiCategory(JpResidentRegistrationNumberValue); + /// JP Social Insurance Number. + public static PiiCategory JpSocialInsuranceNumber { get; } = new PiiCategory(JpSocialInsuranceNumberValue); + /// JP My Number Corporate. + public static PiiCategory JpMyNumberCorporate { get; } = new PiiCategory(JpMyNumberCorporateValue); + /// JP My Number Personal. + public static PiiCategory JpMyNumberPersonal { get; } = new PiiCategory(JpMyNumberPersonalValue); + /// JP Residence Card Number. + public static PiiCategory JpResidenceCardNumber { get; } = new PiiCategory(JpResidenceCardNumberValue); + /// LV Personal Code. + public static PiiCategory LvPersonalCode { get; } = new PiiCategory(LvPersonalCodeValue); + /// LT Personal Code. + public static PiiCategory LtPersonalCode { get; } = new PiiCategory(LtPersonalCodeValue); + /// LU National Identification Number Natural. + public static PiiCategory LuNationalIdentificationNumberNatural { get; } = new PiiCategory(LuNationalIdentificationNumberNaturalValue); + /// LU National Identification Number Non Natural. + public static PiiCategory LuNationalIdentificationNumberNonNatural { get; } = new PiiCategory(LuNationalIdentificationNumberNonNaturalValue); + /// MY Identity Card Number. + public static PiiCategory MyIdentityCardNumber { get; } = new PiiCategory(MyIdentityCardNumberValue); + /// MT Identity Card Number. + public static PiiCategory MtIdentityCardNumber { get; } = new PiiCategory(MtIdentityCardNumberValue); + /// MT Tax ID Number. + public static PiiCategory MtTaxIdNumber { get; } = new PiiCategory(MtTaxIdNumberValue); + /// NL Citizens Service Number. + public static PiiCategory NlCitizensServiceNumber { get; } = new PiiCategory(NlCitizensServiceNumberValue); + /// NL Citizens Service Number V2. + public static PiiCategory NlCitizensServiceNumberV2 { get; } = new PiiCategory(NlCitizensServiceNumberV2Value); + /// NL Tax Identification Number. + public static PiiCategory NlTaxIdentificationNumber { get; } = new PiiCategory(NlTaxIdentificationNumberValue); + /// NL Value Added Tax Number. + public static PiiCategory NlValueAddedTaxNumber { get; } = new PiiCategory(NlValueAddedTaxNumberValue); + /// NZ Bank Account Number. + public static PiiCategory NzBankAccountNumber { get; } = new PiiCategory(NzBankAccountNumberValue); + /// NZ Driver's License Number. + public static PiiCategory NzDriversLicenseNumber { get; } = new PiiCategory(NzDriversLicenseNumberValue); + /// NZ Inland Revenue Number. + public static PiiCategory NzInlandRevenueNumber { get; } = new PiiCategory(NzInlandRevenueNumberValue); + /// NZ Ministry Of Health Number. + public static PiiCategory NzMinistryOfHealthNumber { get; } = new PiiCategory(NzMinistryOfHealthNumberValue); + /// NZ Social Welfare Number. + public static PiiCategory NzSocialWelfareNumber { get; } = new PiiCategory(NzSocialWelfareNumberValue); + /// NO Identity Number. + public static PiiCategory NoIdentityNumber { get; } = new PiiCategory(NoIdentityNumberValue); + /// PH Unified Multi Purpose ID Number. + public static PiiCategory PhUnifiedMultiPurposeIdNumber { get; } = new PiiCategory(PhUnifiedMultiPurposeIdNumberValue); + /// PL Identity Card. + public static PiiCategory PlIdentityCard { get; } = new PiiCategory(PlIdentityCardValue); + /// PL National ID. + public static PiiCategory PlNationalId { get; } = new PiiCategory(PlNationalIdValue); + /// PL National ID V2. + public static PiiCategory PlNationalIdV2 { get; } = new PiiCategory(PlNationalIdV2Value); + /// PL Passport Number. + public static PiiCategory PlPassportNumber { get; } = new PiiCategory(PlPassportNumberValue); + /// PL Tax Identification Number. + public static PiiCategory PlTaxIdentificationNumber { get; } = new PiiCategory(PlTaxIdentificationNumberValue); + /// PL REGON Number. + public static PiiCategory PlRegonNumber { get; } = new PiiCategory(PlRegonNumberValue); + /// PT Citizen Card Number. + public static PiiCategory PtCitizenCardNumber { get; } = new PiiCategory(PtCitizenCardNumberValue); + /// PT Citizen Card Number V2. + public static PiiCategory PtCitizenCardNumberV2 { get; } = new PiiCategory(PtCitizenCardNumberV2Value); + /// PT Tax Identification Number. + public static PiiCategory PtTaxIdentificationNumber { get; } = new PiiCategory(PtTaxIdentificationNumberValue); + /// RO Personal Numerical Code. + public static PiiCategory RoPersonalNumericalCode { get; } = new PiiCategory(RoPersonalNumericalCodeValue); + /// RU Passport Number Domestic. + public static PiiCategory RuPassportNumberDomestic { get; } = new PiiCategory(RuPassportNumberDomesticValue); + /// RU Passport Number International. + public static PiiCategory RuPassportNumberInternational { get; } = new PiiCategory(RuPassportNumberInternationalValue); + /// SA National ID. + public static PiiCategory SaNationalId { get; } = new PiiCategory(SaNationalIdValue); + /// SG National Registration Identity Card Number. + public static PiiCategory SgNationalRegistrationIdentityCardNumber { get; } = new PiiCategory(SgNationalRegistrationIdentityCardNumberValue); + /// SK Personal Number. + public static PiiCategory SkPersonalNumber { get; } = new PiiCategory(SkPersonalNumberValue); + /// SI Tax Identification Number. + public static PiiCategory SiTaxIdentificationNumber { get; } = new PiiCategory(SiTaxIdentificationNumberValue); + /// SI Unique Master Citizen Number. + public static PiiCategory SiUniqueMasterCitizenNumber { get; } = new PiiCategory(SiUniqueMasterCitizenNumberValue); + /// ZA Identification Number. + public static PiiCategory ZaIdentificationNumber { get; } = new PiiCategory(ZaIdentificationNumberValue); + /// KR Resident Registration Number. + public static PiiCategory KrResidentRegistrationNumber { get; } = new PiiCategory(KrResidentRegistrationNumberValue); + /// ES DNI. + public static PiiCategory EsDni { get; } = new PiiCategory(EsDniValue); + /// ES Social Security Number. + public static PiiCategory EsSocialSecurityNumber { get; } = new PiiCategory(EsSocialSecurityNumberValue); + /// ES Tax Identification Number. + public static PiiCategory EsTaxIdentificationNumber { get; } = new PiiCategory(EsTaxIdentificationNumberValue); + /// SQL Server Connection String. + public static PiiCategory SqlServerConnectionString { get; } = new PiiCategory(SqlServerConnectionStringValue); + /// SE National ID. + public static PiiCategory SeNationalId { get; } = new PiiCategory(SeNationalIdValue); + /// SE National ID V2. + public static PiiCategory SeNationalIdV2 { get; } = new PiiCategory(SeNationalIdV2Value); + /// SE Passport Number. + public static PiiCategory SePassportNumber { get; } = new PiiCategory(SePassportNumberValue); + /// SE Tax Identification Number. + public static PiiCategory SeTaxIdentificationNumber { get; } = new PiiCategory(SeTaxIdentificationNumberValue); + /// SWIFT Code. + public static PiiCategory SwiftCode { get; } = new PiiCategory(SwiftCodeValue); + /// CH Social Security Number. + public static PiiCategory ChSocialSecurityNumber { get; } = new PiiCategory(ChSocialSecurityNumberValue); + /// TW National ID. + public static PiiCategory TwNationalId { get; } = new PiiCategory(TwNationalIdValue); + /// TW Passport Number. + public static PiiCategory TwPassportNumber { get; } = new PiiCategory(TwPassportNumberValue); + /// TW Resident Certificate. + public static PiiCategory TwResidentCertificate { get; } = new PiiCategory(TwResidentCertificateValue); + /// TH Population Identification Code. + public static PiiCategory ThPopulationIdentificationCode { get; } = new PiiCategory(ThPopulationIdentificationCodeValue); + /// TR National Identification Number. + public static PiiCategory TrNationalIdentificationNumber { get; } = new PiiCategory(TrNationalIdentificationNumberValue); + /// UK Driver's License Number. + public static PiiCategory UkDriversLicenseNumber { get; } = new PiiCategory(UkDriversLicenseNumberValue); + /// UK Electoral Roll Number. + public static PiiCategory UkElectoralRollNumber { get; } = new PiiCategory(UkElectoralRollNumberValue); + /// UK National Health Number. + public static PiiCategory UkNationalHealthNumber { get; } = new PiiCategory(UkNationalHealthNumberValue); + /// UK National Insurance Number. + public static PiiCategory UkNationalInsuranceNumber { get; } = new PiiCategory(UkNationalInsuranceNumberValue); + /// UK Unique Taxpayer Number. + public static PiiCategory UkUniqueTaxpayerNumber { get; } = new PiiCategory(UkUniqueTaxpayerNumberValue); + /// US UK Passport Number. + public static PiiCategory UsUkPassportNumber { get; } = new PiiCategory(UsUkPassportNumberValue); + /// US Bank Account Number. + public static PiiCategory UsBankAccountNumber { get; } = new PiiCategory(UsBankAccountNumberValue); + /// US Driver's License Number. + public static PiiCategory UsDriversLicenseNumber { get; } = new PiiCategory(UsDriversLicenseNumberValue); + /// US Individual Taxpayer Identification. + public static PiiCategory UsIndividualTaxpayerIdentification { get; } = new PiiCategory(UsIndividualTaxpayerIdentificationValue); + /// US Social Security Number. + public static PiiCategory UsSocialSecurityNumber { get; } = new PiiCategory(UsSocialSecurityNumberValue); + /// UA Passport Number Domestic. + public static PiiCategory UaPassportNumberDomestic { get; } = new PiiCategory(UaPassportNumberDomesticValue); + /// UA Passport Number International. + public static PiiCategory UaPassportNumberInternational { get; } = new PiiCategory(UaPassportNumberInternationalValue); + /// Organization. + public static PiiCategory Organization { get; } = new PiiCategory(OrganizationValue); + /// Email. + public static PiiCategory Email { get; } = new PiiCategory(EmailValue); + /// URL. + public static PiiCategory URL { get; } = new PiiCategory(URLValue); + /// Age. + public static PiiCategory Age { get; } = new PiiCategory(AgeValue); + /// Phone Number. + public static PiiCategory PhoneNumber { get; } = new PiiCategory(PhoneNumberValue); + /// IP Address. + public static PiiCategory IPAddress { get; } = new PiiCategory(IPAddressValue); + /// Date. + public static PiiCategory Date { get; } = new PiiCategory(DateValue); + /// Person. + public static PiiCategory Person { get; } = new PiiCategory(PersonValue); + /// Address. + public static PiiCategory Address { get; } = new PiiCategory(AddressValue); + /// All PII categories. + public static PiiCategory All { get; } = new PiiCategory(AllValue); + /// Default PII categories for the language. + public static PiiCategory Default { get; } = new PiiCategory(DefaultValue); + /// Determines if two values are the same. + public static bool operator ==(PiiCategory left, PiiCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PiiCategory left, PiiCategory right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PiiCategory(string value) => new PiiCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PiiCategory other && Equals(other); + /// + public bool Equals(PiiCategory 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiDomain.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiDomain.cs new file mode 100644 index 000000000000..219eecd43306 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiDomain.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.AI.Language.Documents +{ + /// PII domains. + public readonly partial struct PiiDomain : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PiiDomain(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PhiValue = "phi"; + private const string NoneValue = "none"; + + /// Indicates that entities in the Personal Health Information domain should be redacted. + public static PiiDomain Phi { get; } = new PiiDomain(PhiValue); + /// Indicates that no domain is specified. + public static PiiDomain None { get; } = new PiiDomain(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(PiiDomain left, PiiDomain right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PiiDomain left, PiiDomain right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PiiDomain(string value) => new PiiDomain(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PiiDomain other && Equals(other); + /// + public bool Equals(PiiDomain 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiEntityRecognitionOperationResult.Serialization.cs similarity index 59% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiEntityRecognitionOperationResult.Serialization.cs index 9d514afbcb92..99144941446d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiEntityRecognitionOperationResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomHealthcareOperationResult : IUtf8JsonSerializable, IJsonModel + public partial class PiiEntityRecognitionOperationResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(PiiEntityRecognitionOperationResult)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -39,19 +39,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(Results, options); } - CustomHealthcareOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + PiiEntityRecognitionOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(PiiEntityRecognitionOperationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareOperationResult(document.RootElement, options); + return DeserializePiiEntityRecognitionOperationResult(document.RootElement, options); } - internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static PiiEntityRecognitionOperationResult DeserializePiiEntityRecognitionOperationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,18 +59,18 @@ internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOpera { return null; } - CustomHealthcareResult results = default; + AnalyzeDocumentsResult results = default; DateTimeOffset lastUpdateDateTime = default; - TextActionState status = default; + DocumentActionState status = default; string taskName = default; - AnalyzeTextOperationResultsKind kind = default; + AnalyzeDocumentsOperationResultsKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) { - results = CustomHealthcareResult.DeserializeCustomHealthcareResult(property.Value, options); + results = AnalyzeDocumentsResult.DeserializeAnalyzeDocumentsResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) @@ -80,7 +80,7 @@ internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOpera } if (property.NameEquals("status"u8)) { - status = new TextActionState(property.Value.GetString()); + status = new DocumentActionState(property.Value.GetString()); continue; } if (property.NameEquals("taskName"u8)) @@ -90,7 +90,7 @@ internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOpera } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextOperationResultsKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationResultsKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -99,7 +99,7 @@ internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOpera } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareOperationResult( + return new PiiEntityRecognitionOperationResult( lastUpdateDateTime, status, taskName, @@ -108,43 +108,43 @@ internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOpera results); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(PiiEntityRecognitionOperationResult)} does not support writing '{options.Format}' format."); } } - CustomHealthcareOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + PiiEntityRecognitionOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareOperationResult(document.RootElement, options); + return DeserializePiiEntityRecognitionOperationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(PiiEntityRecognitionOperationResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomHealthcareOperationResult FromResponse(Response response) + internal static new PiiEntityRecognitionOperationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareOperationResult(document.RootElement); + return DeserializePiiEntityRecognitionOperationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiEntityRecognitionOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiEntityRecognitionOperationResult.cs new file mode 100644 index 000000000000..8e4c7f49cb8b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiEntityRecognitionOperationResult.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Contains the PII LRO results. + public partial class PiiEntityRecognitionOperationResult : AnalyzeDocumentsLROResult + { + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// The list of pii document results. + /// is null. + internal PiiEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, AnalyzeDocumentsResult results) : base(lastUpdateDateTime, status) + { + Argument.AssertNotNull(results, nameof(results)); + + Kind = AnalyzeDocumentsOperationResultsKind.PiiEntityRecognitionOperationResults; + Results = results; + } + + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Keeps track of any properties unknown to the library. + /// The list of pii document results. + internal PiiEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, string taskName, AnalyzeDocumentsOperationResultsKind kind, IDictionary serializedAdditionalRawData, AnalyzeDocumentsResult results) : base(lastUpdateDateTime, status, taskName, kind, serializedAdditionalRawData) + { + Results = results; + } + + /// Initializes a new instance of for deserialization. + internal PiiEntityRecognitionOperationResult() + { + } + + /// The list of pii document results. + public AnalyzeDocumentsResult Results { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiLROTask.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiLROTask.Serialization.cs new file mode 100644 index 000000000000..9cfc6cd1ebb3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiLROTask.Serialization.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class PiiLROTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(PiiLROTask)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, options); + } + } + + PiiLROTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PiiLROTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePiiLROTask(document.RootElement, options); + } + + internal static PiiLROTask DeserializePiiLROTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PiiActionContent parameters = default; + string taskName = default; + AnalyzeDocumentsOperationActionKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameters = PiiActionContent.DeserializePiiActionContent(property.Value, options); + continue; + } + if (property.NameEquals("taskName"u8)) + { + taskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new AnalyzeDocumentsOperationActionKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PiiLROTask(taskName, kind, serializedAdditionalRawData, parameters); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PiiLROTask)} does not support writing '{options.Format}' format."); + } + } + + PiiLROTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePiiLROTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PiiLROTask)} 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 new PiiLROTask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePiiLROTask(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiLROTask.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiLROTask.cs new file mode 100644 index 000000000000..9a3b2ebff301 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/PiiLROTask.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Contains the analyze text PIIEntityRecognition LRO task. + public partial class PiiLROTask : AnalyzeDocumentsOperationAction + { + /// Initializes a new instance of . + public PiiLROTask() + { + Kind = AnalyzeDocumentsOperationActionKind.PiiEntityRecognition; + } + + /// Initializes a new instance of . + /// task name. + /// The kind of task to perform. + /// Keeps track of any properties unknown to the library. + /// Pii task parameters. + internal PiiLROTask(string name, AnalyzeDocumentsOperationActionKind kind, IDictionary serializedAdditionalRawData, PiiActionContent parameters) : base(name, kind, serializedAdditionalRawData) + { + Parameters = parameters; + } + + /// Pii task parameters. + public PiiActionContent Parameters { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RedactionCharacter.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RedactionCharacter.cs new file mode 100644 index 000000000000..745c91425e38 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RedactionCharacter.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + public readonly partial struct RedactionCharacter : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedactionCharacter(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExclamationPointValue = "!"; + private const string NumberSignValue = "#"; + private const string DollarValue = "$"; + private const string PerCentValue = "%"; + private const string AmpersandValue = "&"; + private const string AsteriskValue = "*"; + private const string PlusValue = "+"; + private const string MinusValue = "-"; + private const string EqualsValueValue = "="; + private const string QuestionMarkValue = "?"; + private const string AtSignValue = "@"; + private const string CaretValue = "^"; + private const string UnderscoreValue = "_"; + private const string TildeValue = "~"; + + /// Exclamation point character. + public static RedactionCharacter ExclamationPoint { get; } = new RedactionCharacter(ExclamationPointValue); + /// Number sign character. + public static RedactionCharacter NumberSign { get; } = new RedactionCharacter(NumberSignValue); + /// Dollar sign character. + public static RedactionCharacter Dollar { get; } = new RedactionCharacter(DollarValue); + /// Percent sign character. + public static RedactionCharacter PerCent { get; } = new RedactionCharacter(PerCentValue); + /// Ampersand character. + public static RedactionCharacter Ampersand { get; } = new RedactionCharacter(AmpersandValue); + /// Asterisk character. + public static RedactionCharacter Asterisk { get; } = new RedactionCharacter(AsteriskValue); + /// Plus sign character. + public static RedactionCharacter Plus { get; } = new RedactionCharacter(PlusValue); + /// Minus sign character. + public static RedactionCharacter Minus { get; } = new RedactionCharacter(MinusValue); + /// Equals sign character. + public static RedactionCharacter EqualsValue { get; } = new RedactionCharacter(EqualsValueValue); + /// Question mark character. + public static RedactionCharacter QuestionMark { get; } = new RedactionCharacter(QuestionMarkValue); + /// At sign character. + public static RedactionCharacter AtSign { get; } = new RedactionCharacter(AtSignValue); + /// Caret character. + public static RedactionCharacter Caret { get; } = new RedactionCharacter(CaretValue); + /// Underscore character. + public static RedactionCharacter Underscore { get; } = new RedactionCharacter(UnderscoreValue); + /// Tilde character. + public static RedactionCharacter Tilde { get; } = new RedactionCharacter(TildeValue); + /// Determines if two values are the same. + public static bool operator ==(RedactionCharacter left, RedactionCharacter right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedactionCharacter left, RedactionCharacter right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedactionCharacter(string value) => new RedactionCharacter(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedactionCharacter other && Equals(other); + /// + public bool Equals(RedactionCharacter 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RedactionPolicyKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RedactionPolicyKind.cs new file mode 100644 index 000000000000..f40995ea77e4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RedactionPolicyKind.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.AI.Language.Documents +{ + /// Kinds of redaction policies supported. + internal readonly partial struct RedactionPolicyKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedactionPolicyKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoMaskValue = "noMask"; + private const string CharacterMaskValue = "characterMask"; + private const string EntityMaskValue = "entityMask"; + + /// Do not redact detected entities. + public static RedactionPolicyKind NoMask { get; } = new RedactionPolicyKind(NoMaskValue); + /// React detected entities with redaction character. + public static RedactionPolicyKind CharacterMask { get; } = new RedactionPolicyKind(CharacterMaskValue); + /// Redact detected entities with entity type. + public static RedactionPolicyKind EntityMask { get; } = new RedactionPolicyKind(EntityMaskValue); + /// Determines if two values are the same. + public static bool operator ==(RedactionPolicyKind left, RedactionPolicyKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedactionPolicyKind left, RedactionPolicyKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedactionPolicyKind(string value) => new RedactionPolicyKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedactionPolicyKind other && Equals(other); + /// + public bool Equals(RedactionPolicyKind 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RequestStatistics.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RequestStatistics.Serialization.cs new file mode 100644 index 000000000000..47309dba820f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RequestStatistics.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + public partial class RequestStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequestStatistics)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("documentsCount"u8); + writer.WriteNumberValue(DocumentsCount); + writer.WritePropertyName("validDocumentsCount"u8); + writer.WriteNumberValue(ValidDocumentsCount); + writer.WritePropertyName("erroneousDocumentsCount"u8); + writer.WriteNumberValue(ErroneousDocumentsCount); + writer.WritePropertyName("transactionsCount"u8); + writer.WriteNumberValue(TransactionsCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RequestStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequestStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRequestStatistics(document.RootElement, options); + } + + internal static RequestStatistics DeserializeRequestStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int documentsCount = default; + int validDocumentsCount = default; + int erroneousDocumentsCount = default; + long transactionsCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("documentsCount"u8)) + { + documentsCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("validDocumentsCount"u8)) + { + validDocumentsCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("erroneousDocumentsCount"u8)) + { + erroneousDocumentsCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("transactionsCount"u8)) + { + transactionsCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RequestStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transactionsCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RequestStatistics)} does not support writing '{options.Format}' format."); + } + } + + RequestStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRequestStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RequestStatistics)} 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 RequestStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeRequestStatistics(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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RequestStatistics.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RequestStatistics.cs new file mode 100644 index 000000000000..412a637869b6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/RequestStatistics.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// if showStats=true was specified in the request this field will contain information about the request payload. + public partial class RequestStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Number of documents submitted in the request. + /// Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. + /// Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. + /// Number of transactions for the request. + internal RequestStatistics(int documentsCount, int validDocumentsCount, int erroneousDocumentsCount, long transactionsCount) + { + DocumentsCount = documentsCount; + ValidDocumentsCount = validDocumentsCount; + ErroneousDocumentsCount = erroneousDocumentsCount; + TransactionsCount = transactionsCount; + } + + /// Initializes a new instance of . + /// Number of documents submitted in the request. + /// Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. + /// Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. + /// Number of transactions for the request. + /// Keeps track of any properties unknown to the library. + internal RequestStatistics(int documentsCount, int validDocumentsCount, int erroneousDocumentsCount, long transactionsCount, IDictionary serializedAdditionalRawData) + { + DocumentsCount = documentsCount; + ValidDocumentsCount = validDocumentsCount; + ErroneousDocumentsCount = erroneousDocumentsCount; + TransactionsCount = transactionsCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RequestStatistics() + { + } + + /// Number of documents submitted in the request. + public int DocumentsCount { get; } + /// Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. + public int ValidDocumentsCount { get; } + /// Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. + public int ErroneousDocumentsCount { get; } + /// Number of transactions for the request. + public long TransactionsCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ScriptCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ScriptCode.cs new file mode 100644 index 000000000000..18ac4db182c7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ScriptCode.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// Identifies the script of the input document. Maps to the ISO 15924 standard script code. + public readonly partial struct ScriptCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScriptCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ArabValue = "Arab"; + private const string ArmnValue = "Armn"; + private const string BengValue = "Beng"; + private const string CansValue = "Cans"; + private const string CyrlValue = "Cyrl"; + private const string DevaValue = "Deva"; + private const string EthiValue = "Ethi"; + private const string GeorValue = "Geor"; + private const string GrekValue = "Grek"; + private const string GujrValue = "Gujr"; + private const string GuruValue = "Guru"; + private const string HangValue = "Hang"; + private const string HansValue = "Hans"; + private const string HantValue = "Hant"; + private const string HebrValue = "Hebr"; + private const string JpanValue = "Jpan"; + private const string KhmrValue = "Khmr"; + private const string KndaValue = "Knda"; + private const string LaooValue = "Laoo"; + private const string LatnValue = "Latn"; + private const string MlymValue = "Mlym"; + private const string MymrValue = "Mymr"; + private const string OryaValue = "Orya"; + private const string SinhValue = "Sinh"; + private const string TamlValue = "Taml"; + private const string TeluValue = "Telu"; + private const string ThaaValue = "Thaa"; + private const string ThaiValue = "Thai"; + private const string TibtValue = "Tibt"; + + /// Script code for the Arabic script. + public static ScriptCode Arab { get; } = new ScriptCode(ArabValue); + /// Script code for the Armenian script. + public static ScriptCode Armn { get; } = new ScriptCode(ArmnValue); + /// Script code for the Bangla script. + public static ScriptCode Beng { get; } = new ScriptCode(BengValue); + /// Script code for the UnifiedCanadianAboriginalSyllabics script. + public static ScriptCode Cans { get; } = new ScriptCode(CansValue); + /// Script code for the Cyrillic script. + public static ScriptCode Cyrl { get; } = new ScriptCode(CyrlValue); + /// Script code for the Devanagari script. + public static ScriptCode Deva { get; } = new ScriptCode(DevaValue); + /// Script code for the Ethiopic script. + public static ScriptCode Ethi { get; } = new ScriptCode(EthiValue); + /// Script code for the Georgian script. + public static ScriptCode Geor { get; } = new ScriptCode(GeorValue); + /// Script code for the Greek script. + public static ScriptCode Grek { get; } = new ScriptCode(GrekValue); + /// Script code for the Gujarati script. + public static ScriptCode Gujr { get; } = new ScriptCode(GujrValue); + /// Script code for the Gurmukhi script. + public static ScriptCode Guru { get; } = new ScriptCode(GuruValue); + /// Script code for the Hangul script. + public static ScriptCode Hang { get; } = new ScriptCode(HangValue); + /// Script code for the HanSimplified script. + public static ScriptCode Hans { get; } = new ScriptCode(HansValue); + /// Script code for the HanTraditional script. + public static ScriptCode Hant { get; } = new ScriptCode(HantValue); + /// Script code for the Hebrew script. + public static ScriptCode Hebr { get; } = new ScriptCode(HebrValue); + /// Script code for the Japanese script. + public static ScriptCode Jpan { get; } = new ScriptCode(JpanValue); + /// Script code for the Khmer script. + public static ScriptCode Khmr { get; } = new ScriptCode(KhmrValue); + /// Script code for the Kannada script. + public static ScriptCode Knda { get; } = new ScriptCode(KndaValue); + /// Script code for the Lao script. + public static ScriptCode Laoo { get; } = new ScriptCode(LaooValue); + /// Script code for the Latin script. + public static ScriptCode Latn { get; } = new ScriptCode(LatnValue); + /// Script code for the Malayalam script. + public static ScriptCode Mlym { get; } = new ScriptCode(MlymValue); + /// Script code for the Myanmar script. + public static ScriptCode Mymr { get; } = new ScriptCode(MymrValue); + /// Script code for the Odia script. + public static ScriptCode Orya { get; } = new ScriptCode(OryaValue); + /// Script code for the Sinhala script. + public static ScriptCode Sinh { get; } = new ScriptCode(SinhValue); + /// Script code for the Tamil script. + public static ScriptCode Taml { get; } = new ScriptCode(TamlValue); + /// Script code for the Telugu script. + public static ScriptCode Telu { get; } = new ScriptCode(TeluValue); + /// Script code for the Thaana script. + public static ScriptCode Thaa { get; } = new ScriptCode(ThaaValue); + /// Script code for the Thai script. + public static ScriptCode Thai { get; } = new ScriptCode(ThaiValue); + /// Script code for the Tibetan script. + public static ScriptCode Tibt { get; } = new ScriptCode(TibtValue); + /// Determines if two values are the same. + public static bool operator ==(ScriptCode left, ScriptCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScriptCode left, ScriptCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScriptCode(string value) => new ScriptCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScriptCode other && Equals(other); + /// + public bool Equals(ScriptCode 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ScriptKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ScriptKind.cs new file mode 100644 index 000000000000..1694198acd77 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/ScriptKind.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Documents +{ + /// The script of the text. + public readonly partial struct ScriptKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScriptKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ArabicValue = "Arabic"; + private const string ArmenianValue = "Armenian"; + private const string BanglaValue = "Bangla"; + private const string UnifiedCanadianAboriginalSyllabicsValue = "UnifiedCanadianAboriginalSyllabics"; + private const string CyrillicValue = "Cyrillic"; + private const string DevanagariValue = "Devanagari"; + private const string EthiopicValue = "Ethiopic"; + private const string GeorgianValue = "Georgian"; + private const string GreekValue = "Greek"; + private const string GujaratiValue = "Gujarati"; + private const string GurmukhiValue = "Gurmukhi"; + private const string HangulValue = "Hangul"; + private const string HanSimplifiedValue = "HanSimplified"; + private const string HanTraditionalValue = "HanTraditional"; + private const string HebrewValue = "Hebrew"; + private const string JapaneseValue = "Japanese"; + private const string KhmerValue = "Khmer"; + private const string KannadaValue = "Kannada"; + private const string LaoValue = "Lao"; + private const string LatinValue = "Latin"; + private const string MalayalamValue = "Malayalam"; + private const string MyanmarValue = "Myanmar"; + private const string OdiaValue = "Odia"; + private const string SinhalaValue = "Sinhala"; + private const string TamilValue = "Tamil"; + private const string TeluguValue = "Telugu"; + private const string ThaanaValue = "Thaana"; + private const string ThaiValue = "Thai"; + private const string TibetanValue = "Tibetan"; + + /// Script name for the Arabic script. + public static ScriptKind Arabic { get; } = new ScriptKind(ArabicValue); + /// Script name for the Armenian script. + public static ScriptKind Armenian { get; } = new ScriptKind(ArmenianValue); + /// Script name for the Bangla script. + public static ScriptKind Bangla { get; } = new ScriptKind(BanglaValue); + /// Script name for the UnifiedCanadianAboriginalSyllabics script. + public static ScriptKind UnifiedCanadianAboriginalSyllabics { get; } = new ScriptKind(UnifiedCanadianAboriginalSyllabicsValue); + /// Script name for the Cyrillic script. + public static ScriptKind Cyrillic { get; } = new ScriptKind(CyrillicValue); + /// Script name for the Devanagari script. + public static ScriptKind Devanagari { get; } = new ScriptKind(DevanagariValue); + /// Script name for the Ethiopic script. + public static ScriptKind Ethiopic { get; } = new ScriptKind(EthiopicValue); + /// Script name for the Georgian script. + public static ScriptKind Georgian { get; } = new ScriptKind(GeorgianValue); + /// Script name for the Greek script. + public static ScriptKind Greek { get; } = new ScriptKind(GreekValue); + /// Script name for the Gujarati script. + public static ScriptKind Gujarati { get; } = new ScriptKind(GujaratiValue); + /// Script name for the Gurmukhi script. + public static ScriptKind Gurmukhi { get; } = new ScriptKind(GurmukhiValue); + /// Script name for the Hangul script. + public static ScriptKind Hangul { get; } = new ScriptKind(HangulValue); + /// Script name for the HanSimplified script. + public static ScriptKind HanSimplified { get; } = new ScriptKind(HanSimplifiedValue); + /// Script name for the HanTraditional script. + public static ScriptKind HanTraditional { get; } = new ScriptKind(HanTraditionalValue); + /// Script name for the Hebrew script. + public static ScriptKind Hebrew { get; } = new ScriptKind(HebrewValue); + /// Script name for the Japanese script. + public static ScriptKind Japanese { get; } = new ScriptKind(JapaneseValue); + /// Script name for the Khmer script. + public static ScriptKind Khmer { get; } = new ScriptKind(KhmerValue); + /// Script name for the Kannada script. + public static ScriptKind Kannada { get; } = new ScriptKind(KannadaValue); + /// Script name for the Lao script. + public static ScriptKind Lao { get; } = new ScriptKind(LaoValue); + /// Script name for the Latin script. + public static ScriptKind Latin { get; } = new ScriptKind(LatinValue); + /// Script name for the Malayalam script. + public static ScriptKind Malayalam { get; } = new ScriptKind(MalayalamValue); + /// Script name for the Myanmar script. + public static ScriptKind Myanmar { get; } = new ScriptKind(MyanmarValue); + /// Script name for the Odia script. + public static ScriptKind Odia { get; } = new ScriptKind(OdiaValue); + /// Script name for the Sinhala script. + public static ScriptKind Sinhala { get; } = new ScriptKind(SinhalaValue); + /// Script name for the Tamil script. + public static ScriptKind Tamil { get; } = new ScriptKind(TamilValue); + /// Script name for the Telugu script. + public static ScriptKind Telugu { get; } = new ScriptKind(TeluguValue); + /// Script name for the Thaana script. + public static ScriptKind Thaana { get; } = new ScriptKind(ThaanaValue); + /// Script name for the Thai script. + public static ScriptKind Thai { get; } = new ScriptKind(ThaiValue); + /// Script name for the Tibetan script. + public static ScriptKind Tibetan { get; } = new ScriptKind(TibetanValue); + /// Determines if two values are the same. + public static bool operator ==(ScriptKind left, ScriptKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScriptKind left, ScriptKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScriptKind(string value) => new ScriptKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScriptKind other && Equals(other); + /// + public bool Equals(ScriptKind 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/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/StringIndexType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/StringIndexType.cs new file mode 100644 index 000000000000..8cea3c841d13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/StringIndexType.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.AI.Language.Documents +{ + /// Specifies the method used to interpret string offsets. Defaults to documents Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/documents-analytics-offsets. + public readonly partial struct StringIndexType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StringIndexType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextElementsV8Value = "TextElements_v8"; + private const string UnicodeCodePointValue = "UnicodeCodePoint"; + private const string Utf16CodeUnitValue = "Utf16CodeUnit"; + + /// Returned offset and length values will correspond to textElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. + public static StringIndexType TextElementsV8 { get; } = new StringIndexType(TextElementsV8Value); + /// Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. + public static StringIndexType UnicodeCodePoint { get; } = new StringIndexType(UnicodeCodePointValue); + /// Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. + public static StringIndexType Utf16CodeUnit { get; } = new StringIndexType(Utf16CodeUnitValue); + /// Determines if two values are the same. + public static bool operator ==(StringIndexType left, StringIndexType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StringIndexType left, StringIndexType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator StringIndexType(string value) => new StringIndexType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StringIndexType other && Equals(other); + /// + public bool Equals(StringIndexType 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.Serialization.cs similarity index 55% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.Serialization.cs index 6159763405a5..701e30c62096 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomSentenceSentiment : IUtf8JsonSerializable, IJsonModel + public partial class SummaryContext : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,18 +28,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SummaryContext)} does not support writing '{format}' format."); } - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment.ToSerialString()); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores, options); writer.WritePropertyName("offset"u8); writer.WriteNumberValue(Offset); writer.WritePropertyName("length"u8); @@ -61,19 +55,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomSentenceSentiment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SummaryContext IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SummaryContext)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentenceSentiment(document.RootElement, options); + return DeserializeSummaryContext(document.RootElement, options); } - internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonElement element, ModelReaderWriterOptions options = null) + internal static SummaryContext DeserializeSummaryContext(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -81,30 +75,12 @@ internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonE { return null; } - string text = default; - SentenceSentimentValue sentiment = default; - SentimentConfidenceScores confidenceScores = default; int offset = default; int length = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("sentiment"u8)) - { - sentiment = property.Value.GetString().ToSentenceSentimentValue(); - continue; - } - if (property.NameEquals("confidenceScores"u8)) - { - confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value, options); - continue; - } if (property.NameEquals("offset"u8)) { offset = property.Value.GetInt32(); @@ -121,52 +97,46 @@ internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new CustomSentenceSentiment( - text, - sentiment, - confidenceScores, - offset, - length, - serializedAdditionalRawData); + return new SummaryContext(offset, length, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SummaryContext)} does not support writing '{options.Format}' format."); } } - CustomSentenceSentiment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SummaryContext IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentenceSentiment(document.RootElement, options); + return DeserializeSummaryContext(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SummaryContext)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomSentenceSentiment FromResponse(Response response) + internal static SummaryContext FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentenceSentiment(document.RootElement); + return DeserializeSummaryContext(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.cs new file mode 100644 index 000000000000..46f103fbe91d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryContext.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.AI.Language.Documents +{ + /// The context of the summary. + public partial class SummaryContext + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. + /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. + internal SummaryContext(int offset, int length) + { + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. + /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. + /// Keeps track of any properties unknown to the library. + internal SummaryContext(int offset, int length, IDictionary serializedAdditionalRawData) + { + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SummaryContext() + { + } + + /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. + public int Offset { get; } + /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryLengthBucket.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryLengthBucket.cs new file mode 100644 index 000000000000..aab181741897 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/SummaryLengthBucket.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.AI.Language.Documents +{ + /// Enum that defines the length of the output summaries. + public readonly partial struct SummaryLengthBucket : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SummaryLengthBucket(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ShortValue = "short"; + private const string MediumValue = "medium"; + private const string LongValue = "long"; + + /// Instructs model to generate shorter length summaries. + public static SummaryLengthBucket Short { get; } = new SummaryLengthBucket(ShortValue); + /// Instructs model to generate medium length summaries. + public static SummaryLengthBucket Medium { get; } = new SummaryLengthBucket(MediumValue); + /// Instructs model to generate longer length summaries. + public static SummaryLengthBucket Long { get; } = new SummaryLengthBucket(LongValue); + /// Determines if two values are the same. + public static bool operator ==(SummaryLengthBucket left, SummaryLengthBucket right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SummaryLengthBucket left, SummaryLengthBucket right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SummaryLengthBucket(string value) => new SummaryLengthBucket(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SummaryLengthBucket other && Equals(other); + /// + public bool Equals(SummaryLengthBucket 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.Serialization.cs similarity index 51% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.Serialization.cs index 6ed0d4ba2057..e14531a2363f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class AnalyzeTextDynamicClassificationResult : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownAnalyzeDocumentsLROResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,30 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter wri /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results, options); } - AnalyzeTextDynamicClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AnalyzeDocumentsLROResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement, options); + return DeserializeAnalyzeDocumentsLROResult(document.RootElement, options); } - internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDynamicClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownAnalyzeDocumentsLROResult DeserializeUnknownAnalyzeDocumentsLROResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -59,20 +57,32 @@ internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDyn { return null; } - DynamicClassificationResult results = default; - AnalyzeTextResultsKind kind = default; + DateTimeOffset lastUpdateDateTime = default; + DocumentActionState status = default; + string taskName = default; + AnalyzeDocumentsOperationResultsKind kind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("results"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - results = DynamicClassificationResult.DeserializeDynamicClassificationResult(property.Value, options); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new DocumentActionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("taskName"u8)) + { + taskName = property.Value.GetString(); continue; } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextResultsKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationResultsKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -81,53 +91,53 @@ internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDyn } } serializedAdditionalRawData = rawDataDictionary; - return new AnalyzeTextDynamicClassificationResult(kind, serializedAdditionalRawData, results); + return new UnknownAnalyzeDocumentsLROResult(lastUpdateDateTime, status, taskName, kind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support writing '{options.Format}' format."); } } - AnalyzeTextDynamicClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AnalyzeDocumentsLROResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement, options); + return DeserializeAnalyzeDocumentsLROResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsLROResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new AnalyzeTextDynamicClassificationResult FromResponse(Response response) + internal static new UnknownAnalyzeDocumentsLROResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement); + return DeserializeUnknownAnalyzeDocumentsLROResult(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.cs new file mode 100644 index 000000000000..9c3ef105c17f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsLROResult.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Unknown version of AnalyzeDocumentsLROResult. + internal partial class UnknownAnalyzeDocumentsLROResult : AnalyzeDocumentsLROResult + { + /// Initializes a new instance of . + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Keeps track of any properties unknown to the library. + internal UnknownAnalyzeDocumentsLROResult(DateTimeOffset lastUpdateDateTime, DocumentActionState status, string taskName, AnalyzeDocumentsOperationResultsKind kind, IDictionary serializedAdditionalRawData) : base(lastUpdateDateTime, status, taskName, kind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownAnalyzeDocumentsLROResult() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsOperationAction.Serialization.cs similarity index 58% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsOperationAction.Serialization.cs index d54b17a0b762..b344df805d75 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsOperationAction.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Language.Text +namespace Azure.AI.Language.Documents { - public partial class CustomHealthcareOperationAction : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownAnalyzeDocumentsOperationAction : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,33 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(ActionContent)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); - } } - CustomHealthcareOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AnalyzeDocumentsOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareOperationAction(document.RootElement, options); + return DeserializeAnalyzeDocumentsOperationAction(document.RootElement, options); } - internal static CustomHealthcareOperationAction DeserializeCustomHealthcareOperationAction(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownAnalyzeDocumentsOperationAction DeserializeUnknownAnalyzeDocumentsOperationAction(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,22 +57,12 @@ internal static CustomHealthcareOperationAction DeserializeCustomHealthcareOpera { return null; } - CustomHealthcareActionContent parameters = default; string taskName = default; - AnalyzeTextOperationActionKind kind = default; + AnalyzeDocumentsOperationActionKind kind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = CustomHealthcareActionContent.DeserializeCustomHealthcareActionContent(property.Value, options); - continue; - } if (property.NameEquals("taskName"u8)) { taskName = property.Value.GetString(); @@ -85,7 +70,7 @@ internal static CustomHealthcareOperationAction DeserializeCustomHealthcareOpera } if (property.NameEquals("kind"u8)) { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); + kind = new AnalyzeDocumentsOperationActionKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -94,53 +79,53 @@ internal static CustomHealthcareOperationAction DeserializeCustomHealthcareOpera } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareOperationAction(taskName, kind, serializedAdditionalRawData, parameters); + return new UnknownAnalyzeDocumentsOperationAction(taskName, kind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support writing '{options.Format}' format."); } } - CustomHealthcareOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AnalyzeDocumentsOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareOperationAction(document.RootElement, options); + return DeserializeAnalyzeDocumentsOperationAction(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeDocumentsOperationAction)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomHealthcareOperationAction FromResponse(Response response) + internal static new UnknownAnalyzeDocumentsOperationAction FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareOperationAction(document.RootElement); + return DeserializeUnknownAnalyzeDocumentsOperationAction(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsOperationAction.cs new file mode 100644 index 000000000000..6210ebe0959d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownAnalyzeDocumentsOperationAction.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Unknown version of AnalyzeDocumentsOperationAction. + internal partial class UnknownAnalyzeDocumentsOperationAction : AnalyzeDocumentsOperationAction + { + /// Initializes a new instance of . + /// task name. + /// The kind of task to perform. + /// Keeps track of any properties unknown to the library. + internal UnknownAnalyzeDocumentsOperationAction(string name, AnalyzeDocumentsOperationActionKind kind, IDictionary serializedAdditionalRawData) : base(name, kind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownAnalyzeDocumentsOperationAction() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..0d4265acf8c7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + internal partial class UnknownBaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static UnknownBaseRedactionPolicy DeserializeUnknownBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBaseRedactionPolicy(policyKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 new UnknownBaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownBaseRedactionPolicy(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownBaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownBaseRedactionPolicy.cs new file mode 100644 index 000000000000..425e88574313 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownBaseRedactionPolicy.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Unknown version of BaseRedactionPolicy. + internal partial class UnknownBaseRedactionPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal UnknownBaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownBaseRedactionPolicy() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownDocumentLocation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownDocumentLocation.Serialization.cs new file mode 100644 index 000000000000..a92bfc19628f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownDocumentLocation.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Documents +{ + internal partial class UnknownDocumentLocation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(DocumentLocation)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DocumentLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentLocation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentLocation(document.RootElement, options); + } + + internal static UnknownDocumentLocation DeserializeUnknownDocumentLocation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentLocationKind kind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new DocumentLocationKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDocumentLocation(kind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentLocation)} does not support writing '{options.Format}' format."); + } + } + + DocumentLocation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentLocation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentLocation)} 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 new UnknownDocumentLocation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownDocumentLocation(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownDocumentLocation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownDocumentLocation.cs new file mode 100644 index 000000000000..71c919bc6a67 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/UnknownDocumentLocation.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Documents +{ + /// Unknown version of DocumentLocation. + internal partial class UnknownDocumentLocation : DocumentLocation + { + /// Initializes a new instance of . + /// The kind of the document location. + /// Keeps track of any properties unknown to the library. + internal UnknownDocumentLocation(DocumentLocationKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownDocumentLocation() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/WarningCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/WarningCode.cs new file mode 100644 index 000000000000..e2bcfb7ff685 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Generated/WarningCode.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.AI.Language.Documents +{ + /// Defines the list of the warning codes. + public readonly partial struct WarningCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WarningCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LongWordsInDocumentValue = "LongWordsInDocument"; + private const string DocumentTruncatedValue = "DocumentTruncated"; + + /// Long words in document warning. + public static WarningCode LongWordsInDocument { get; } = new WarningCode(LongWordsInDocumentValue); + /// Document truncated warning. + public static WarningCode DocumentTruncated { get; } = new WarningCode(DocumentTruncatedValue); + /// Determines if two values are the same. + public static bool operator ==(WarningCode left, WarningCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WarningCode left, WarningCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WarningCode(string value) => new WarningCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WarningCode other && Equals(other); + /// + public bool Equals(WarningCode 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/cognitivelanguage/Azure.AI.Language.Documents/src/Properties/AssemblyInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..89e00e029ab6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/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.AI.Language.Documents.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/cognitivelanguage/Azure.AI.Language.Documents/tests/Azure.AI.Language.Documents.Tests.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tests/Azure.AI.Language.Documents.Tests.csproj new file mode 100644 index 000000000000..1d375e766d27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tests/Azure.AI.Language.Documents.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/tests/Generated/Samples/Samples_AnalyzeDocumentsClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tests/Generated/Samples/Samples_AnalyzeDocumentsClient.cs new file mode 100644 index 000000000000..73eb22b823ec --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tests/Generated/Samples/Samples_AnalyzeDocumentsClient.cs @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Language.Documents.Samples +{ + public partial class Samples_AnalyzeDocumentsClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocumentsJobState_GetAnalyzeDocumentsJobStatus_SuccessfulAnalyzeDocumentsJobStatusTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + Response response = client.GetAnalyzeDocumentsJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocumentsJobState_GetAnalyzeDocumentsJobStatus_SuccessfulAnalyzeDocumentsJobStatusTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + Response response = await client.GetAnalyzeDocumentsJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); + Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocumentsJobState_GetAnalyzeDocumentsJobStatus_SuccessfulAnalyzeDocumentsJobStatusTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + Response response = client.GetAnalyzeDocumentsJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocumentsJobState_GetAnalyzeDocumentsJobStatus_SuccessfulAnalyzeDocumentsJobStatusTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + Response response = await client.GetAnalyzeDocumentsJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocuments_AnalyzeDocumentsSubmitOperation_SuccessfulAnalyzeDocumentsJobsTaskSubmitRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redact PII from documents example", + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +source = new +{ +location = "https://myblob.blob.core.windows.net/Container/document.txt", +kind = "AzureBlob", +}, +target = new +{ +location = "https://myblob.blob.core.windows.net/Container", +kind = "AzureBlob", +}, +} + }, + }, + tasks = new object[] + { +new +{ +kind = "PiiEntityRecognition", +taskName = "Redact PII Task 1", +parameters = new +{ +redactionPolicy = new +{ +policyKind = "entityMask", +}, +piiCategories = new object[] +{ +"Person", +"Organization" +}, +}, +} + }, + }); + Operation operation = client.AnalyzeDocumentsSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocuments_AnalyzeDocumentsSubmitOperation_SuccessfulAnalyzeDocumentsJobsTaskSubmitRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redact PII from documents example", + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +source = new +{ +location = "https://myblob.blob.core.windows.net/Container/document.txt", +kind = "AzureBlob", +}, +target = new +{ +location = "https://myblob.blob.core.windows.net/Container", +kind = "AzureBlob", +}, +} + }, + }, + tasks = new object[] + { +new +{ +kind = "PiiEntityRecognition", +taskName = "Redact PII Task 1", +parameters = new +{ +redactionPolicy = new +{ +policyKind = "entityMask", +}, +piiCategories = new object[] +{ +"Person", +"Organization" +}, +}, +} + }, + }); + Operation operation = await client.AnalyzeDocumentsSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocuments_AnalyzeDocumentsSubmitOperation_SuccessfulAnalyzeDocumentsJobsTaskSubmitRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + AnalyzeDocumentsOperationInput analyzeDocumentOperationInput = new AnalyzeDocumentsOperationInput(new MultiLanguageDocumentInput + { + Documents = {new MultiLanguageInput("1", new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container/document.txt"), new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container")) +{ +Language = "en", +}}, + }, new AnalyzeDocumentsOperationAction[] + { +new PiiLROTask +{ +Parameters = new PiiActionContent +{ +PiiCategories = {PiiCategory.Person, PiiCategory.Organization}, +RedactionPolicy = new EntityMaskPolicy(), +}, +Name = "Redact PII Task 1", +} + }) + { + DisplayName = "Redact PII from documents example", + }; + Operation operation = client.AnalyzeDocumentsSubmitOperation(WaitUntil.Completed, analyzeDocumentOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocuments_AnalyzeDocumentsSubmitOperation_SuccessfulAnalyzeDocumentsJobsTaskSubmitRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + AnalyzeDocumentsOperationInput analyzeDocumentOperationInput = new AnalyzeDocumentsOperationInput(new MultiLanguageDocumentInput + { + Documents = {new MultiLanguageInput("1", new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container/document.txt"), new AzureBlobDocumentLocation("https://myblob.blob.core.windows.net/Container")) +{ +Language = "en", +}}, + }, new AnalyzeDocumentsOperationAction[] + { +new PiiLROTask +{ +Parameters = new PiiActionContent +{ +PiiCategories = {PiiCategory.Person, PiiCategory.Organization}, +RedactionPolicy = new EntityMaskPolicy(), +}, +Name = "Redact PII Task 1", +} + }) + { + DisplayName = "Redact PII from documents example", + }; + Operation operation = await client.AnalyzeDocumentsSubmitOperationAsync(WaitUntil.Completed, analyzeDocumentOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeDocuments_AnalyzeDocumentsCancelOperation_SuccessfulAnalyzeDocumentsJobsCancelRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + Operation operation = client.AnalyzeDocumentsCancelOperation(WaitUntil.Completed, Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeDocuments_AnalyzeDocumentsCancelOperation_SuccessfulAnalyzeDocumentsJobsCancelRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeDocumentsClient client = new AnalyzeDocumentsClient(endpoint, credential); + + Operation operation = await client.AnalyzeDocumentsCancelOperationAsync(WaitUntil.Completed, Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Documents/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tsp-location.yaml new file mode 100644 index 000000000000..81e944eaf80e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Documents/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cognitiveservices/Language.AnalyzeDocuments +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs index c9d187a629d9..acd2ec3b46fe 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs @@ -12,7 +12,7 @@ namespace Azure.AI.Language.Text.Authoring { // Data plane generated client. - /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href="https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. public partial class AuthoringClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml index 1c0e1d21fd59..d04c4a7bba13 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/cognitiveservices/Language.AnalyzeText-authoring -commit: 1bbb8f628f6e3083b73a2190e15bb0f5911571a3 +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c repo: Azure/azure-rest-api-specs - +additionalDirectories: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs index 7a0901bb70a8..50c6ee1f50e7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs @@ -3,9 +3,9 @@ namespace Azure.AI.Language.Text public partial class AbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AbstractiveSummarizationActionContent() { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } - public string Query { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } @@ -122,21 +122,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AnalyzeTextDynamicClassificationResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AnalyzeTextDynamicClassificationResult() { } - public Azure.AI.Language.Text.DynamicClassificationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class AnalyzeTextEntitiesResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AnalyzeTextEntitiesResult() { } - public Azure.AI.Language.Text.EntitiesResult Results { get { throw null; } } + public Azure.AI.Language.Text.EntitiesWithMetadataAutoResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.AnalyzeTextEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -363,6 +352,27 @@ 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 abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CharacterMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ClassificationActionResult() { } @@ -390,24 +400,6 @@ 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; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ClassificationType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ClassificationType(string value) { throw null; } - public static Azure.AI.Language.Text.ClassificationType Multi { get { throw null; } } - public static Azure.AI.Language.Text.ClassificationType Single { get { throw null; } } - public bool Equals(Azure.AI.Language.Text.ClassificationType 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.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public static implicit operator Azure.AI.Language.Text.ClassificationType (string value) { throw null; } - public static bool operator !=(Azure.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public override string ToString() { throw null; } - } public partial class CurrencyMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CurrencyMetadata() { } @@ -421,59 +413,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomAbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public int? SentenceCount { get { throw null; } set { } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationOperationAction(Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent ActionContent { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesActionContent(string projectName, string deploymentName) { } @@ -488,21 +427,6 @@ 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 CustomEntitiesActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomEntitiesActionResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesOperationAction() { } @@ -514,10 +438,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CustomEntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntitiesResult() { } + public string DeploymentName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CustomEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomEntitiesActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomEntitiesResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -525,107 +464,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomHealthcareActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareActionResult() { } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Relations { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareEntity() { } - public Azure.AI.Language.Text.HealthcareAssertion Assertion { get { throw null; } } - public Azure.AI.Language.Text.HealthcareEntityCategory Category { get { throw null; } } - public double ConfidenceScore { get { throw null; } } - public System.Collections.Generic.IReadOnlyList EntityComponentInformation { get { throw null; } } - public int Length { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } - public string Name { get { throw null; } } - public int Offset { get { throw null; } } - public string Subcategory { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareOperationAction() { } - public Azure.AI.Language.Text.CustomHealthcareActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomLabelClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomHealthcareOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomHealthcareResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomLabelClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomLabelClassificationActionResult() { } + internal CustomLabelClassificationResult() { } public string DeploymentName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class CustomMultiLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -654,7 +506,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomMultiLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomMultiLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -662,89 +514,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomSentenceSentiment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentenceSentiment() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public int Length { get { throw null; } } - public int Offset { get { throw null; } } - public Azure.AI.Language.Text.SentenceSentimentValue Sentiment { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisOperationAction() { } - public Azure.AI.Language.Text.CustomSentimentAnalysisActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomSentimentAnalysisResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResultDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResultDocument() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Sentences { get { throw null; } } - public Azure.AI.Language.Text.DocumentSentiment Sentiment { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomSingleLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomSingleLabelClassificationActionContent(string projectName, string deploymentName) { } @@ -772,7 +541,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomSingleLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomSingleLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -821,8 +590,8 @@ internal DetectedLanguage() { } public double ConfidenceScore { get { throw null; } } public string Iso6391Name { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Language.Text.ScriptKind? Script { get { throw null; } } - public Azure.AI.Language.Text.ScriptCode? ScriptCode { get { throw null; } } + public Azure.AI.Language.Text.ScriptCode? ScriptIso15924Code { get { throw null; } } + public Azure.AI.Language.Text.ScriptKind? ScriptName { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.DetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -874,48 +643,6 @@ 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 DynamicClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DynamicClassificationActionContent(System.Collections.Generic.IEnumerable categories) { } - public System.Collections.Generic.IList Categories { get { throw null; } } - public Azure.AI.Language.Text.ClassificationType? ClassificationType { get { throw null; } set { } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ModelVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationDocumentResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationDocumentResult() { } - public System.Collections.Generic.IReadOnlyList Classifications { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ModelVersion { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntitiesActionContent() { } @@ -933,6 +660,20 @@ 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 EntitiesDocumentResultWithMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesDocumentResultWithMetadata() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesDocumentResultWithMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesDocumentResultWithMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntitiesDocumentResultWithMetadataDetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitiesDocumentResultWithMetadataDetectedLanguage() { } @@ -962,7 +703,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class EntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitiesResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ModelVersion { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } @@ -973,6 +714,20 @@ 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 EntitiesWithMetadataAutoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesWithMetadataAutoResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntityActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntityActionResult() { } @@ -1056,16 +811,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Language.Text.EntityCategory left, Azure.AI.Language.Text.EntityCategory right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class EntityComponentInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected EntityComponentInformation() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntityInferenceConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntityInferenceConfig() { } @@ -1155,6 +900,16 @@ 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 EntityMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EntityOverlapPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityOverlapPolicy() { } @@ -1767,17 +1522,6 @@ 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 LearnedComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal LearnedComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class LengthMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LengthMetadata() { } @@ -1840,17 +1584,6 @@ 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 ListComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ListComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class MatchLongestEntityPolicyType : Azure.AI.Language.Text.EntityOverlapPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MatchLongestEntityPolicyType() { } @@ -1920,6 +1653,16 @@ 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 NoMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 NumberKind : System.IEquatable { @@ -1989,7 +1732,7 @@ public PiiActionContent() { } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public System.Collections.Generic.IList PiiCategories { get { throw null; } } - public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Text.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.PiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2002,7 +1745,7 @@ public partial class PiiActionResult : System.ClientModel.Primitives.IJsonModel< { internal PiiActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public string RedactedText { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } @@ -2419,6 +2162,27 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PiiEntityWithTags : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PiiEntityWithTags() { } + public string Category { get { throw null; } } + public double ConfidenceScore { get { throw null; } } + public int Length { get { throw null; } } + public string Mask { get { throw null; } } + public int? MaskLength { get { throw null; } } + public int? MaskOffset { get { throw null; } } + public int Offset { get { throw null; } } + public string Subcategory { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tags { get { throw null; } } + public string Text { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntityWithTags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntityWithTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PiiOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PiiOperationAction() { } @@ -2444,17 +2208,6 @@ 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 PrebuiltComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PrebuiltComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RangeInclusivity : System.IEquatable { @@ -2633,6 +2386,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Gujr { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Guru { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hang { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Hani { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hans { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hant { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hebr { get { throw null; } } @@ -2642,8 +2396,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Laoo { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Latn { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mlym { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mong { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mtei { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mymr { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Olck { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Orya { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Shrd { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Sinh { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Taml { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Telu { get { throw null; } } @@ -2677,6 +2435,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Gujarati { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Gurmukhi { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hangul { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind HanLiteral { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanSimplified { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanTraditional { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hebrew { get { throw null; } } @@ -2686,8 +2445,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Lao { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Latin { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Malayalam { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Meitei { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Mongolian { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Myanmar { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Odia { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Santali { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Sharada { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Sinhala { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Tamil { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Telugu { get { throw null; } } @@ -3136,12 +2899,13 @@ public static partial class TextAnalysisClientBuilderExtensions } public partial class TextAnalysisClientOptions : Azure.Core.ClientOptions { - public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2023_11_15_Preview) { } + public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, - V2023_11_15_Preview = 3, + V2024_11_01 = 3, + V2024_11_15_Preview = 4, } } public static partial class TextAnalysisModelFactory @@ -3151,8 +2915,7 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.AbstractiveSummary AbstractiveSummary(string text = null, System.Collections.Generic.IEnumerable contexts = null) { throw null; } public static Azure.AI.Language.Text.AbstractiveSummaryActionResult AbstractiveSummaryActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable summaries = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.AgeMetadata AgeMetadata(double value = 0, Azure.AI.Language.Text.AgeUnit unit = default(Azure.AI.Language.Text.AgeUnit)) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult AnalyzeTextDynamicClassificationResult(Azure.AI.Language.Text.DynamicClassificationResult results = null) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesWithMetadataAutoResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(Azure.AI.Language.Text.EntityLinkingResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextError AnalyzeTextError(Azure.AI.Language.Text.AnalyzeTextErrorCode code = default(Azure.AI.Language.Text.AnalyzeTextErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.InnerErrorModel innererror = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextKeyPhraseResult AnalyzeTextKeyPhraseResult(Azure.AI.Language.Text.KeyPhraseResult results = null) { throw null; } @@ -3165,39 +2928,25 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.ClassificationActionResult ClassificationActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable @class = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.ClassificationResult ClassificationResult(string category = null, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.CurrencyMetadata CurrencyMetadata(double value = 0, string unit = null, string iso4217 = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent CustomAbstractiveSummarizationActionContent(int? sentenceCount = default(int?), Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?), Azure.AI.Language.Text.SummaryLengthBucket? summaryLength = default(Azure.AI.Language.Text.SummaryLengthBucket?), bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction CustomAbstractiveSummarizationOperationAction(string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult CustomAbstractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationResult CustomAbstractiveSummarizationResult(System.Collections.Generic.IEnumerable documents = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null) { throw null; } public static Azure.AI.Language.Text.CustomEntitiesActionContent CustomEntitiesActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomEntitiesActionResult CustomEntitiesActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionContent CustomHealthcareActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionResult CustomHealthcareActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, System.Collections.Generic.IEnumerable relations = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareEntity CustomHealthcareEntity(string text = null, Azure.AI.Language.Text.HealthcareEntityCategory category = default(Azure.AI.Language.Text.HealthcareEntityCategory), string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, Azure.AI.Language.Text.HealthcareAssertion assertion = null, string name = null, System.Collections.Generic.IEnumerable links = null, System.Collections.Generic.IEnumerable entityComponentInformation = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareOperationResult CustomHealthcareOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomHealthcareResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareResult CustomHealthcareResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomLabelClassificationActionResult CustomLabelClassificationActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntitiesResult CustomEntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomLabelClassificationResult CustomLabelClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.CustomMultiLabelClassificationActionContent CustomMultiLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentenceSentiment CustomSentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisActionContent CustomSentimentAnalysisActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult CustomSentimentAnalysisOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomSentimentAnalysisResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResult CustomSentimentAnalysisResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument CustomSentimentAnalysisResultDocument(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DocumentSentiment sentiment = Azure.AI.Language.Text.DocumentSentiment.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, System.Collections.Generic.IEnumerable sentences = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.CustomSingleLabelClassificationActionContent CustomSingleLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.DateMetadata DateMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateTimeMetadata DateTimeMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateValue DateValue(string timex = null, string value = null, Azure.AI.Language.Text.TemporalModifier? modifier = default(Azure.AI.Language.Text.TemporalModifier?)) { throw null; } - public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? script = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptCode = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } + public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? scriptName = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptIso15924Code = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } public static Azure.AI.Language.Text.DocumentError DocumentError(string id = null, Azure.AI.Language.Text.AnalyzeTextError error = null) { throw null; } public static Azure.AI.Language.Text.DocumentStatistics DocumentStatistics(int charactersCount = 0, int transactionsCount = 0) { throw null; } public static Azure.AI.Language.Text.DocumentWarning DocumentWarning(Azure.AI.Language.Text.WarningCode code = default(Azure.AI.Language.Text.WarningCode), string message = null, string targetRef = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationDocumentResult DynamicClassificationDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable classifications = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationResult DynamicClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesDocumentResultWithMetadata EntitiesDocumentResultWithMetadata(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null) { throw null; } public static Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage EntitiesDocumentResultWithMetadataDetectedLanguage(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesWithMetadataAutoResult EntitiesWithMetadataAutoResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.EntityActionResult EntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingActionResult EntityLinkingActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingMatch EntityLinkingMatch(double confidenceScore = 0, string text = null, int offset = 0, int length = 0) { throw null; } @@ -3226,20 +2975,18 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.LanguageDetectionDocumentResult LanguageDetectionDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.LanguageDetectionResult LanguageDetectionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.LanguageInput LanguageInput(string id = null, string text = null, string countryHint = null) { throw null; } - public static Azure.AI.Language.Text.LearnedComponent LearnedComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.LengthMetadata LengthMetadata(double value = 0, Azure.AI.Language.Text.LengthUnit unit = default(Azure.AI.Language.Text.LengthUnit)) { throw null; } public static Azure.AI.Language.Text.LinkedEntity LinkedEntity(string name = null, System.Collections.Generic.IEnumerable matches = null, string language = null, string id = null, string url = null, string dataSource = null, string bingId = null) { throw null; } - public static Azure.AI.Language.Text.ListComponent ListComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.MultiLanguageInput MultiLanguageInput(string id = null, string text = null, string language = null) { throw null; } public static Azure.AI.Language.Text.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.NamedEntityWithMetadata NamedEntityWithMetadata(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, Azure.AI.Language.Text.BaseMetadata metadata = null) { throw null; } public static Azure.AI.Language.Text.NumberMetadata NumberMetadata(Azure.AI.Language.Text.NumberKind numberKind = default(Azure.AI.Language.Text.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Text.NumericRangeMetadata NumericRangeMetadata(Azure.AI.Language.Text.RangeKind rangeKind = default(Azure.AI.Language.Text.RangeKind), double minimum = 0, double maximum = 0, Azure.AI.Language.Text.RangeInclusivity? rangeInclusivity = default(Azure.AI.Language.Text.RangeInclusivity?)) { throw null; } public static Azure.AI.Language.Text.OrdinalMetadata OrdinalMetadata(string offset = null, Azure.AI.Language.Text.RelativeTo relativeTo = default(Azure.AI.Language.Text.RelativeTo), string value = null) { throw null; } - public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.PiiResult results = null) { throw null; } + public static Azure.AI.Language.Text.PiiEntityWithTags PiiEntityWithTags(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Text.PiiResult PiiResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.PrebuiltComponent PrebuiltComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.RequestStatistics RequestStatistics(int documentsCount = 0, int validDocumentsCount = 0, int erroneousDocumentsCount = 0, long transactionsCount = (long)0) { throw null; } public static Azure.AI.Language.Text.SentenceAssessment SentenceAssessment(Azure.AI.Language.Text.TokenSentiment sentiment = Azure.AI.Language.Text.TokenSentiment.Positive, Azure.AI.Language.Text.TargetConfidenceScoreLabel confidenceScores = null, int offset = 0, int length = 0, string text = null, bool isNegated = false) { throw null; } public static Azure.AI.Language.Text.SentenceSentiment SentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0, System.Collections.Generic.IEnumerable targets = null, System.Collections.Generic.IEnumerable assessments = null) { throw null; } @@ -3261,18 +3008,6 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.VolumeMetadata VolumeMetadata(double value = 0, Azure.AI.Language.Text.VolumeUnit unit = default(Azure.AI.Language.Text.VolumeUnit)) { throw null; } public static Azure.AI.Language.Text.WeightMetadata WeightMetadata(double value = 0, Azure.AI.Language.Text.WeightUnit unit = default(Azure.AI.Language.Text.WeightUnit)) { throw null; } } - public partial class TextDynamicClassificationInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public TextDynamicClassificationInput() { } - public Azure.AI.Language.Text.DynamicClassificationActionContent ActionContent { get { throw null; } set { } } - public Azure.AI.Language.Text.MultiLanguageTextInput TextInput { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class TextEntityLinkingInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TextEntityLinkingInput() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs index 7a0901bb70a8..50c6ee1f50e7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs @@ -3,9 +3,9 @@ namespace Azure.AI.Language.Text public partial class AbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AbstractiveSummarizationActionContent() { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } - public string Query { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } @@ -122,21 +122,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AnalyzeTextDynamicClassificationResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AnalyzeTextDynamicClassificationResult() { } - public Azure.AI.Language.Text.DynamicClassificationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class AnalyzeTextEntitiesResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AnalyzeTextEntitiesResult() { } - public Azure.AI.Language.Text.EntitiesResult Results { get { throw null; } } + public Azure.AI.Language.Text.EntitiesWithMetadataAutoResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.AnalyzeTextEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -363,6 +352,27 @@ 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 abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CharacterMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ClassificationActionResult() { } @@ -390,24 +400,6 @@ 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; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ClassificationType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ClassificationType(string value) { throw null; } - public static Azure.AI.Language.Text.ClassificationType Multi { get { throw null; } } - public static Azure.AI.Language.Text.ClassificationType Single { get { throw null; } } - public bool Equals(Azure.AI.Language.Text.ClassificationType 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.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public static implicit operator Azure.AI.Language.Text.ClassificationType (string value) { throw null; } - public static bool operator !=(Azure.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public override string ToString() { throw null; } - } public partial class CurrencyMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CurrencyMetadata() { } @@ -421,59 +413,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomAbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public int? SentenceCount { get { throw null; } set { } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationOperationAction(Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent ActionContent { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesActionContent(string projectName, string deploymentName) { } @@ -488,21 +427,6 @@ 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 CustomEntitiesActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomEntitiesActionResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesOperationAction() { } @@ -514,10 +438,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CustomEntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntitiesResult() { } + public string DeploymentName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CustomEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomEntitiesActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomEntitiesResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -525,107 +464,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomHealthcareActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareActionResult() { } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Relations { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareEntity() { } - public Azure.AI.Language.Text.HealthcareAssertion Assertion { get { throw null; } } - public Azure.AI.Language.Text.HealthcareEntityCategory Category { get { throw null; } } - public double ConfidenceScore { get { throw null; } } - public System.Collections.Generic.IReadOnlyList EntityComponentInformation { get { throw null; } } - public int Length { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } - public string Name { get { throw null; } } - public int Offset { get { throw null; } } - public string Subcategory { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareOperationAction() { } - public Azure.AI.Language.Text.CustomHealthcareActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomLabelClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomHealthcareOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomHealthcareResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomLabelClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomLabelClassificationActionResult() { } + internal CustomLabelClassificationResult() { } public string DeploymentName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class CustomMultiLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -654,7 +506,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomMultiLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomMultiLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -662,89 +514,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomSentenceSentiment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentenceSentiment() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public int Length { get { throw null; } } - public int Offset { get { throw null; } } - public Azure.AI.Language.Text.SentenceSentimentValue Sentiment { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisOperationAction() { } - public Azure.AI.Language.Text.CustomSentimentAnalysisActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomSentimentAnalysisResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResultDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResultDocument() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Sentences { get { throw null; } } - public Azure.AI.Language.Text.DocumentSentiment Sentiment { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomSingleLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomSingleLabelClassificationActionContent(string projectName, string deploymentName) { } @@ -772,7 +541,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomSingleLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomSingleLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -821,8 +590,8 @@ internal DetectedLanguage() { } public double ConfidenceScore { get { throw null; } } public string Iso6391Name { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Language.Text.ScriptKind? Script { get { throw null; } } - public Azure.AI.Language.Text.ScriptCode? ScriptCode { get { throw null; } } + public Azure.AI.Language.Text.ScriptCode? ScriptIso15924Code { get { throw null; } } + public Azure.AI.Language.Text.ScriptKind? ScriptName { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.DetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -874,48 +643,6 @@ 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 DynamicClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DynamicClassificationActionContent(System.Collections.Generic.IEnumerable categories) { } - public System.Collections.Generic.IList Categories { get { throw null; } } - public Azure.AI.Language.Text.ClassificationType? ClassificationType { get { throw null; } set { } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ModelVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationDocumentResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationDocumentResult() { } - public System.Collections.Generic.IReadOnlyList Classifications { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ModelVersion { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntitiesActionContent() { } @@ -933,6 +660,20 @@ 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 EntitiesDocumentResultWithMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesDocumentResultWithMetadata() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesDocumentResultWithMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesDocumentResultWithMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntitiesDocumentResultWithMetadataDetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitiesDocumentResultWithMetadataDetectedLanguage() { } @@ -962,7 +703,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class EntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitiesResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ModelVersion { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } @@ -973,6 +714,20 @@ 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 EntitiesWithMetadataAutoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesWithMetadataAutoResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntityActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntityActionResult() { } @@ -1056,16 +811,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Language.Text.EntityCategory left, Azure.AI.Language.Text.EntityCategory right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class EntityComponentInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected EntityComponentInformation() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntityInferenceConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntityInferenceConfig() { } @@ -1155,6 +900,16 @@ 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 EntityMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EntityOverlapPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityOverlapPolicy() { } @@ -1767,17 +1522,6 @@ 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 LearnedComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal LearnedComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class LengthMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LengthMetadata() { } @@ -1840,17 +1584,6 @@ 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 ListComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ListComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class MatchLongestEntityPolicyType : Azure.AI.Language.Text.EntityOverlapPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MatchLongestEntityPolicyType() { } @@ -1920,6 +1653,16 @@ 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 NoMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 NumberKind : System.IEquatable { @@ -1989,7 +1732,7 @@ public PiiActionContent() { } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public System.Collections.Generic.IList PiiCategories { get { throw null; } } - public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Text.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.PiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2002,7 +1745,7 @@ public partial class PiiActionResult : System.ClientModel.Primitives.IJsonModel< { internal PiiActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public string RedactedText { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } @@ -2419,6 +2162,27 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PiiEntityWithTags : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PiiEntityWithTags() { } + public string Category { get { throw null; } } + public double ConfidenceScore { get { throw null; } } + public int Length { get { throw null; } } + public string Mask { get { throw null; } } + public int? MaskLength { get { throw null; } } + public int? MaskOffset { get { throw null; } } + public int Offset { get { throw null; } } + public string Subcategory { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tags { get { throw null; } } + public string Text { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntityWithTags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntityWithTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PiiOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PiiOperationAction() { } @@ -2444,17 +2208,6 @@ 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 PrebuiltComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PrebuiltComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RangeInclusivity : System.IEquatable { @@ -2633,6 +2386,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Gujr { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Guru { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hang { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Hani { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hans { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hant { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hebr { get { throw null; } } @@ -2642,8 +2396,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Laoo { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Latn { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mlym { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mong { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mtei { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mymr { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Olck { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Orya { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Shrd { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Sinh { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Taml { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Telu { get { throw null; } } @@ -2677,6 +2435,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Gujarati { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Gurmukhi { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hangul { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind HanLiteral { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanSimplified { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanTraditional { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hebrew { get { throw null; } } @@ -2686,8 +2445,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Lao { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Latin { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Malayalam { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Meitei { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Mongolian { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Myanmar { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Odia { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Santali { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Sharada { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Sinhala { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Tamil { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Telugu { get { throw null; } } @@ -3136,12 +2899,13 @@ public static partial class TextAnalysisClientBuilderExtensions } public partial class TextAnalysisClientOptions : Azure.Core.ClientOptions { - public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2023_11_15_Preview) { } + public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, - V2023_11_15_Preview = 3, + V2024_11_01 = 3, + V2024_11_15_Preview = 4, } } public static partial class TextAnalysisModelFactory @@ -3151,8 +2915,7 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.AbstractiveSummary AbstractiveSummary(string text = null, System.Collections.Generic.IEnumerable contexts = null) { throw null; } public static Azure.AI.Language.Text.AbstractiveSummaryActionResult AbstractiveSummaryActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable summaries = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.AgeMetadata AgeMetadata(double value = 0, Azure.AI.Language.Text.AgeUnit unit = default(Azure.AI.Language.Text.AgeUnit)) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult AnalyzeTextDynamicClassificationResult(Azure.AI.Language.Text.DynamicClassificationResult results = null) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesWithMetadataAutoResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(Azure.AI.Language.Text.EntityLinkingResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextError AnalyzeTextError(Azure.AI.Language.Text.AnalyzeTextErrorCode code = default(Azure.AI.Language.Text.AnalyzeTextErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.InnerErrorModel innererror = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextKeyPhraseResult AnalyzeTextKeyPhraseResult(Azure.AI.Language.Text.KeyPhraseResult results = null) { throw null; } @@ -3165,39 +2928,25 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.ClassificationActionResult ClassificationActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable @class = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.ClassificationResult ClassificationResult(string category = null, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.CurrencyMetadata CurrencyMetadata(double value = 0, string unit = null, string iso4217 = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent CustomAbstractiveSummarizationActionContent(int? sentenceCount = default(int?), Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?), Azure.AI.Language.Text.SummaryLengthBucket? summaryLength = default(Azure.AI.Language.Text.SummaryLengthBucket?), bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction CustomAbstractiveSummarizationOperationAction(string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult CustomAbstractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationResult CustomAbstractiveSummarizationResult(System.Collections.Generic.IEnumerable documents = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null) { throw null; } public static Azure.AI.Language.Text.CustomEntitiesActionContent CustomEntitiesActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomEntitiesActionResult CustomEntitiesActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionContent CustomHealthcareActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionResult CustomHealthcareActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, System.Collections.Generic.IEnumerable relations = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareEntity CustomHealthcareEntity(string text = null, Azure.AI.Language.Text.HealthcareEntityCategory category = default(Azure.AI.Language.Text.HealthcareEntityCategory), string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, Azure.AI.Language.Text.HealthcareAssertion assertion = null, string name = null, System.Collections.Generic.IEnumerable links = null, System.Collections.Generic.IEnumerable entityComponentInformation = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareOperationResult CustomHealthcareOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomHealthcareResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareResult CustomHealthcareResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomLabelClassificationActionResult CustomLabelClassificationActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntitiesResult CustomEntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomLabelClassificationResult CustomLabelClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.CustomMultiLabelClassificationActionContent CustomMultiLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentenceSentiment CustomSentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisActionContent CustomSentimentAnalysisActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult CustomSentimentAnalysisOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomSentimentAnalysisResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResult CustomSentimentAnalysisResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument CustomSentimentAnalysisResultDocument(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DocumentSentiment sentiment = Azure.AI.Language.Text.DocumentSentiment.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, System.Collections.Generic.IEnumerable sentences = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.CustomSingleLabelClassificationActionContent CustomSingleLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.DateMetadata DateMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateTimeMetadata DateTimeMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateValue DateValue(string timex = null, string value = null, Azure.AI.Language.Text.TemporalModifier? modifier = default(Azure.AI.Language.Text.TemporalModifier?)) { throw null; } - public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? script = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptCode = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } + public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? scriptName = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptIso15924Code = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } public static Azure.AI.Language.Text.DocumentError DocumentError(string id = null, Azure.AI.Language.Text.AnalyzeTextError error = null) { throw null; } public static Azure.AI.Language.Text.DocumentStatistics DocumentStatistics(int charactersCount = 0, int transactionsCount = 0) { throw null; } public static Azure.AI.Language.Text.DocumentWarning DocumentWarning(Azure.AI.Language.Text.WarningCode code = default(Azure.AI.Language.Text.WarningCode), string message = null, string targetRef = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationDocumentResult DynamicClassificationDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable classifications = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationResult DynamicClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesDocumentResultWithMetadata EntitiesDocumentResultWithMetadata(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null) { throw null; } public static Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage EntitiesDocumentResultWithMetadataDetectedLanguage(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesWithMetadataAutoResult EntitiesWithMetadataAutoResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.EntityActionResult EntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingActionResult EntityLinkingActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingMatch EntityLinkingMatch(double confidenceScore = 0, string text = null, int offset = 0, int length = 0) { throw null; } @@ -3226,20 +2975,18 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.LanguageDetectionDocumentResult LanguageDetectionDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.LanguageDetectionResult LanguageDetectionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.LanguageInput LanguageInput(string id = null, string text = null, string countryHint = null) { throw null; } - public static Azure.AI.Language.Text.LearnedComponent LearnedComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.LengthMetadata LengthMetadata(double value = 0, Azure.AI.Language.Text.LengthUnit unit = default(Azure.AI.Language.Text.LengthUnit)) { throw null; } public static Azure.AI.Language.Text.LinkedEntity LinkedEntity(string name = null, System.Collections.Generic.IEnumerable matches = null, string language = null, string id = null, string url = null, string dataSource = null, string bingId = null) { throw null; } - public static Azure.AI.Language.Text.ListComponent ListComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.MultiLanguageInput MultiLanguageInput(string id = null, string text = null, string language = null) { throw null; } public static Azure.AI.Language.Text.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.NamedEntityWithMetadata NamedEntityWithMetadata(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, Azure.AI.Language.Text.BaseMetadata metadata = null) { throw null; } public static Azure.AI.Language.Text.NumberMetadata NumberMetadata(Azure.AI.Language.Text.NumberKind numberKind = default(Azure.AI.Language.Text.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Text.NumericRangeMetadata NumericRangeMetadata(Azure.AI.Language.Text.RangeKind rangeKind = default(Azure.AI.Language.Text.RangeKind), double minimum = 0, double maximum = 0, Azure.AI.Language.Text.RangeInclusivity? rangeInclusivity = default(Azure.AI.Language.Text.RangeInclusivity?)) { throw null; } public static Azure.AI.Language.Text.OrdinalMetadata OrdinalMetadata(string offset = null, Azure.AI.Language.Text.RelativeTo relativeTo = default(Azure.AI.Language.Text.RelativeTo), string value = null) { throw null; } - public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.PiiResult results = null) { throw null; } + public static Azure.AI.Language.Text.PiiEntityWithTags PiiEntityWithTags(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Text.PiiResult PiiResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.PrebuiltComponent PrebuiltComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.RequestStatistics RequestStatistics(int documentsCount = 0, int validDocumentsCount = 0, int erroneousDocumentsCount = 0, long transactionsCount = (long)0) { throw null; } public static Azure.AI.Language.Text.SentenceAssessment SentenceAssessment(Azure.AI.Language.Text.TokenSentiment sentiment = Azure.AI.Language.Text.TokenSentiment.Positive, Azure.AI.Language.Text.TargetConfidenceScoreLabel confidenceScores = null, int offset = 0, int length = 0, string text = null, bool isNegated = false) { throw null; } public static Azure.AI.Language.Text.SentenceSentiment SentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0, System.Collections.Generic.IEnumerable targets = null, System.Collections.Generic.IEnumerable assessments = null) { throw null; } @@ -3261,18 +3008,6 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.VolumeMetadata VolumeMetadata(double value = 0, Azure.AI.Language.Text.VolumeUnit unit = default(Azure.AI.Language.Text.VolumeUnit)) { throw null; } public static Azure.AI.Language.Text.WeightMetadata WeightMetadata(double value = 0, Azure.AI.Language.Text.WeightUnit unit = default(Azure.AI.Language.Text.WeightUnit)) { throw null; } } - public partial class TextDynamicClassificationInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public TextDynamicClassificationInput() { } - public Azure.AI.Language.Text.DynamicClassificationActionContent ActionContent { get { throw null; } set { } } - public Azure.AI.Language.Text.MultiLanguageTextInput TextInput { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class TextEntityLinkingInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TextEntityLinkingInput() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs index ae5a8b07f083..2a9e6d143306 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs @@ -59,10 +59,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("summaryLength"u8); writer.WriteStringValue(SummaryLength.Value.ToString()); } - if (Optional.IsDefined(Query)) + if (Optional.IsDefined(Instruction)) { - writer.WritePropertyName("query"u8); - writer.WriteStringValue(Query); + writer.WritePropertyName("instruction"u8); + writer.WriteStringValue(Instruction); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -106,7 +106,7 @@ internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSumm int? sentenceCount = default; StringIndexType? stringIndexType = default; SummaryLengthBucket? summaryLength = default; - string query = default; + string instruction = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -152,9 +152,9 @@ internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSumm summaryLength = new SummaryLengthBucket(property.Value.GetString()); continue; } - if (property.NameEquals("query"u8)) + if (property.NameEquals("instruction"u8)) { - query = property.Value.GetString(); + instruction = property.Value.GetString(); continue; } if (options.Format != "W") @@ -169,7 +169,7 @@ internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSumm sentenceCount, stringIndexType, summaryLength, - query, + instruction, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs index 3214056135ad..a6d4cb065674 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs @@ -56,16 +56,16 @@ public AbstractiveSummarizationActionContent() /// Controls the approximate number of sentences in the output summaries. /// String index type. /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - /// (Optional) If provided, the query will be used to generate the summary. + /// (Optional) If provided, the query will be used to generate the summary. /// Keeps track of any properties unknown to the library. - internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, string query, IDictionary serializedAdditionalRawData) + internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, string instruction, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; SentenceCount = sentenceCount; StringIndexType = stringIndexType; SummaryLength = summaryLength; - Query = query; + Instruction = instruction; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,6 +80,6 @@ internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string model /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. public SummaryLengthBucket? SummaryLength { get; set; } /// (Optional) If provided, the query will be used to generate the summary. - public string Query { get; set; } + public string Instruction { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.cs deleted file mode 100644 index d66c33dadeb5..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Result for Dynamic Classification task. - public partial class AnalyzeTextDynamicClassificationResult : AnalyzeTextResult - { - /// Initializes a new instance of . - /// Results for Dynamic Classification task. - /// is null. - internal AnalyzeTextDynamicClassificationResult(DynamicClassificationResult results) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextResultsKind.DynamicClassificationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The kind of task result. - /// Keeps track of any properties unknown to the library. - /// Results for Dynamic Classification task. - internal AnalyzeTextDynamicClassificationResult(AnalyzeTextResultsKind kind, IDictionary serializedAdditionalRawData, DynamicClassificationResult results) : base(kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal AnalyzeTextDynamicClassificationResult() - { - } - - /// Results for Dynamic Classification task. - public DynamicClassificationResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs index ad230d1ed166..c52605e55cb0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs @@ -59,7 +59,7 @@ internal static AnalyzeTextEntitiesResult DeserializeAnalyzeTextEntitiesResult(J { return null; } - EntitiesResult results = default; + EntitiesWithMetadataAutoResult results = default; AnalyzeTextResultsKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -67,7 +67,7 @@ internal static AnalyzeTextEntitiesResult DeserializeAnalyzeTextEntitiesResult(J { if (property.NameEquals("results"u8)) { - results = EntitiesResult.DeserializeEntitiesResult(property.Value, options); + results = EntitiesWithMetadataAutoResult.DeserializeEntitiesWithMetadataAutoResult(property.Value, options); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs index 696dd36427d0..7f710c29b449 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs @@ -16,7 +16,7 @@ public partial class AnalyzeTextEntitiesResult : AnalyzeTextResult /// Initializes a new instance of . /// Results for entity recognition. /// is null. - internal AnalyzeTextEntitiesResult(EntitiesResult results) + internal AnalyzeTextEntitiesResult(EntitiesWithMetadataAutoResult results) { Argument.AssertNotNull(results, nameof(results)); @@ -28,7 +28,7 @@ internal AnalyzeTextEntitiesResult(EntitiesResult results) /// The kind of task result. /// Keeps track of any properties unknown to the library. /// Results for entity recognition. - internal AnalyzeTextEntitiesResult(AnalyzeTextResultsKind kind, IDictionary serializedAdditionalRawData, EntitiesResult results) : base(kind, serializedAdditionalRawData) + internal AnalyzeTextEntitiesResult(AnalyzeTextResultsKind kind, IDictionary serializedAdditionalRawData, EntitiesWithMetadataAutoResult results) : base(kind, serializedAdditionalRawData) { Results = results; } @@ -39,6 +39,6 @@ internal AnalyzeTextEntitiesResult() } /// Results for entity recognition. - public EntitiesResult Results { get; } + public EntitiesWithMetadataAutoResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs index bd1955bbbfe7..91995a4e8cc5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs @@ -77,7 +77,6 @@ internal static AnalyzeTextInput DeserializeAnalyzeTextInput(JsonElement element { switch (discriminator.GetString()) { - case "DynamicClassification": return TextDynamicClassificationInput.DeserializeTextDynamicClassificationInput(element, options); case "EntityLinking": return TextEntityLinkingInput.DeserializeTextEntityLinkingInput(element, options); case "EntityRecognition": return TextEntityRecognitionInput.DeserializeTextEntityRecognitionInput(element, options); case "KeyPhraseExtraction": return TextKeyPhraseExtractionInput.DeserializeTextKeyPhraseExtractionInput(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs index acaec40e815b..79077f47c6be 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// Collection of documents to analyze and a single task to execute. /// 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 abstract partial class AnalyzeTextInput { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs index 81f50e97dcea..3f682727bfc9 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs @@ -28,7 +28,6 @@ public AnalyzeTextInputKind(string value) private const string KeyPhraseExtractionValue = "KeyPhraseExtraction"; private const string LanguageDetectionValue = "LanguageDetection"; private const string EntityLinkingValue = "EntityLinking"; - private const string DynamicClassificationValue = "DynamicClassification"; /// Sentiment analysis task. public static AnalyzeTextInputKind SentimentAnalysis { get; } = new AnalyzeTextInputKind(SentimentAnalysisValue); @@ -42,8 +41,6 @@ public AnalyzeTextInputKind(string value) public static AnalyzeTextInputKind LanguageDetection { get; } = new AnalyzeTextInputKind(LanguageDetectionValue); /// Entity linking task. public static AnalyzeTextInputKind EntityLinking { get; } = new AnalyzeTextInputKind(EntityLinkingValue); - /// Dynamic classification task. - public static AnalyzeTextInputKind DynamicClassification { get; } = new AnalyzeTextInputKind(DynamicClassificationValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextInputKind left, AnalyzeTextInputKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs index ba2bbe1cfe48..11306ae21fa5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs @@ -83,11 +83,8 @@ internal static AnalyzeTextOperationAction DeserializeAnalyzeTextOperationAction switch (discriminator.GetString()) { case "AbstractiveSummarization": return AbstractiveSummarizationOperationAction.DeserializeAbstractiveSummarizationOperationAction(element, options); - case "CustomAbstractiveSummarization": return CustomAbstractiveSummarizationOperationAction.DeserializeCustomAbstractiveSummarizationOperationAction(element, options); case "CustomEntityRecognition": return CustomEntitiesOperationAction.DeserializeCustomEntitiesOperationAction(element, options); - case "CustomHealthcare": return CustomHealthcareOperationAction.DeserializeCustomHealthcareOperationAction(element, options); case "CustomMultiLabelClassification": return CustomMultiLabelClassificationOperationAction.DeserializeCustomMultiLabelClassificationOperationAction(element, options); - case "CustomSentimentAnalysis": return CustomSentimentAnalysisOperationAction.DeserializeCustomSentimentAnalysisOperationAction(element, options); case "CustomSingleLabelClassification": return CustomSingleLabelClassificationOperationAction.DeserializeCustomSingleLabelClassificationOperationAction(element, options); case "EntityLinking": return EntityLinkingOperationAction.DeserializeEntityLinkingOperationAction(element, options); case "EntityRecognition": return EntitiesOperationAction.DeserializeEntitiesOperationAction(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs index 6e1be87da3a2..b09215865ddc 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// The long running task to be performed by the service on the input documents. /// 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 abstract partial class AnalyzeTextOperationAction { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs index 85f656e28396..b25f35074218 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs @@ -33,9 +33,6 @@ public AnalyzeTextOperationActionKind(string value) private const string CustomMultiLabelClassificationValue = "CustomMultiLabelClassification"; private const string ExtractiveSummarizationValue = "ExtractiveSummarization"; private const string AbstractiveSummarizationValue = "AbstractiveSummarization"; - private const string CustomHealthcareValue = "CustomHealthcare"; - private const string CustomSentimentAnalysisValue = "CustomSentimentAnalysis"; - private const string CustomAbstractiveSummarizationValue = "CustomAbstractiveSummarization"; /// Sentiment analysis task. public static AnalyzeTextOperationActionKind SentimentAnalysis { get; } = new AnalyzeTextOperationActionKind(SentimentAnalysisValue); @@ -59,12 +56,6 @@ public AnalyzeTextOperationActionKind(string value) public static AnalyzeTextOperationActionKind ExtractiveSummarization { get; } = new AnalyzeTextOperationActionKind(ExtractiveSummarizationValue); /// Abstractive summarization task. public static AnalyzeTextOperationActionKind AbstractiveSummarization { get; } = new AnalyzeTextOperationActionKind(AbstractiveSummarizationValue); - /// Custom healthcare task. - public static AnalyzeTextOperationActionKind CustomHealthcare { get; } = new AnalyzeTextOperationActionKind(CustomHealthcareValue); - /// Custom sentiment analysis task. - public static AnalyzeTextOperationActionKind CustomSentimentAnalysis { get; } = new AnalyzeTextOperationActionKind(CustomSentimentAnalysisValue); - /// Custom abstractive summarization task. - public static AnalyzeTextOperationActionKind CustomAbstractiveSummarization { get; } = new AnalyzeTextOperationActionKind(CustomAbstractiveSummarizationValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextOperationActionKind left, AnalyzeTextOperationActionKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs index 0a1a9c16e038..e03eb73d4ae7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs @@ -87,11 +87,8 @@ internal static AnalyzeTextOperationResult DeserializeAnalyzeTextOperationResult switch (discriminator.GetString()) { case "AbstractiveSummarizationLROResults": return AbstractiveSummarizationOperationResult.DeserializeAbstractiveSummarizationOperationResult(element, options); - case "CustomAbstractiveSummarizationLROResults": return CustomAbstractiveSummarizationOperationResult.DeserializeCustomAbstractiveSummarizationOperationResult(element, options); case "CustomEntityRecognitionLROResults": return CustomEntityRecognitionOperationResult.DeserializeCustomEntityRecognitionOperationResult(element, options); - case "CustomHealthcareLROResults": return CustomHealthcareOperationResult.DeserializeCustomHealthcareOperationResult(element, options); case "CustomMultiLabelClassificationLROResults": return CustomMultiLabelClassificationOperationResult.DeserializeCustomMultiLabelClassificationOperationResult(element, options); - case "CustomSentimentAnalysisLROResults": return CustomSentimentAnalysisOperationResult.DeserializeCustomSentimentAnalysisOperationResult(element, options); case "CustomSingleLabelClassificationLROResults": return CustomSingleLabelClassificationOperationResult.DeserializeCustomSingleLabelClassificationOperationResult(element, options); case "EntityLinkingLROResults": return EntityLinkingOperationResult.DeserializeEntityLinkingOperationResult(element, options); case "EntityRecognitionLROResults": return EntityRecognitionOperationResult.DeserializeEntityRecognitionOperationResult(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs index 260c0b8689a9..223d4a4fcfb4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// Contains the AnalyzeText long running operation result object. /// 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 abstract partial class AnalyzeTextOperationResult { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs index 7af2d7fe0ee2..49cb8df78e55 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs @@ -33,9 +33,6 @@ public AnalyzeTextOperationResultsKind(string value) private const string CustomMultiLabelClassificationOperationResultsValue = "CustomMultiLabelClassificationLROResults"; private const string ExtractiveSummarizationOperationResultsValue = "ExtractiveSummarizationLROResults"; private const string AbstractiveSummarizationOperationResultsValue = "AbstractiveSummarizationLROResults"; - private const string CustomHealthcareOperationResultsValue = "CustomHealthcareLROResults"; - private const string CustomSentimentAnalysisOperationResultsValue = "CustomSentimentAnalysisLROResults"; - private const string CustomAbstractiveSummarizationOperationResultsValue = "CustomAbstractiveSummarizationLROResults"; /// Sentiment analysis LRO results. public static AnalyzeTextOperationResultsKind SentimentAnalysisOperationResults { get; } = new AnalyzeTextOperationResultsKind(SentimentAnalysisOperationResultsValue); @@ -59,12 +56,6 @@ public AnalyzeTextOperationResultsKind(string value) public static AnalyzeTextOperationResultsKind ExtractiveSummarizationOperationResults { get; } = new AnalyzeTextOperationResultsKind(ExtractiveSummarizationOperationResultsValue); /// Abstractive summarization LRO results. public static AnalyzeTextOperationResultsKind AbstractiveSummarizationOperationResults { get; } = new AnalyzeTextOperationResultsKind(AbstractiveSummarizationOperationResultsValue); - /// Custom healthcare LRO results. - public static AnalyzeTextOperationResultsKind CustomHealthcareOperationResults { get; } = new AnalyzeTextOperationResultsKind(CustomHealthcareOperationResultsValue); - /// Custom sentiment analysis LRO results. - public static AnalyzeTextOperationResultsKind CustomSentimentAnalysisOperationResults { get; } = new AnalyzeTextOperationResultsKind(CustomSentimentAnalysisOperationResultsValue); - /// Custom abstractive summarization LRO results. - public static AnalyzeTextOperationResultsKind CustomAbstractiveSummarizationOperationResults { get; } = new AnalyzeTextOperationResultsKind(CustomAbstractiveSummarizationOperationResultsValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextOperationResultsKind left, AnalyzeTextOperationResultsKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs index c9782bac5ffe..cc06435ba0d4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs @@ -77,7 +77,6 @@ internal static AnalyzeTextResult DeserializeAnalyzeTextResult(JsonElement eleme { switch (discriminator.GetString()) { - case "DynamicClassificationResults": return AnalyzeTextDynamicClassificationResult.DeserializeAnalyzeTextDynamicClassificationResult(element, options); case "EntityLinkingResults": return AnalyzeTextEntityLinkingResult.DeserializeAnalyzeTextEntityLinkingResult(element, options); case "EntityRecognitionResults": return AnalyzeTextEntitiesResult.DeserializeAnalyzeTextEntitiesResult(element, options); case "KeyPhraseExtractionResults": return AnalyzeTextKeyPhraseResult.DeserializeAnalyzeTextKeyPhraseResult(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs index 9820a5ccc0f0..0c13cd559411 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// The result object for the analyze task. /// 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 abstract partial class AnalyzeTextResult { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs index e523ba352fd5..da103b0a1646 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs @@ -28,7 +28,6 @@ public AnalyzeTextResultsKind(string value) private const string KeyPhraseExtractionResultsValue = "KeyPhraseExtractionResults"; private const string LanguageDetectionResultsValue = "LanguageDetectionResults"; private const string EntityLinkingResultsValue = "EntityLinkingResults"; - private const string DynamicClassificationResultsValue = "DynamicClassificationResults"; /// Sentiment analysis results. public static AnalyzeTextResultsKind SentimentAnalysisResults { get; } = new AnalyzeTextResultsKind(SentimentAnalysisResultsValue); @@ -42,8 +41,6 @@ public AnalyzeTextResultsKind(string value) public static AnalyzeTextResultsKind LanguageDetectionResults { get; } = new AnalyzeTextResultsKind(LanguageDetectionResultsValue); /// Entity linking results. public static AnalyzeTextResultsKind EntityLinkingResults { get; } = new AnalyzeTextResultsKind(EntityLinkingResultsValue); - /// Dynamic classification results. - public static AnalyzeTextResultsKind DynamicClassificationResults { get; } = new AnalyzeTextResultsKind(DynamicClassificationResultsValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextResultsKind left, AnalyzeTextResultsKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs index 52e82a53852c..3bfb637bfc63 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs @@ -51,7 +51,7 @@ internal partial class AnalyzeTextSubmitJobRequest /// /// List of tasks to be performed as part of the LRO. /// 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. internal AnalyzeTextSubmitJobRequest(MultiLanguageTextInput textInput, IEnumerable actions) @@ -69,7 +69,7 @@ internal AnalyzeTextSubmitJobRequest(MultiLanguageTextInput textInput, IEnumerab /// /// List of tasks to be performed as part of the LRO. /// 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 . /// /// Default language to use for records requesting automatic language detection. /// Keeps track of any properties unknown to the library. @@ -94,7 +94,7 @@ internal AnalyzeTextSubmitJobRequest() /// /// List of tasks to be performed as part of the LRO. /// 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 IReadOnlyList Actions { get; } /// Default language to use for records requesting automatic language detection. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..ededd27adadd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text +{ + [PersistableModelProxy(typeof(UnknownBaseRedactionPolicy))] + public partial class BaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static BaseRedactionPolicy DeserializeBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("policyKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "characterMask": return CharacterMaskPolicyType.DeserializeCharacterMaskPolicyType(element, options); + case "entityMask": return EntityMaskPolicyType.DeserializeEntityMaskPolicyType(element, options); + case "noMask": return NoMaskPolicyType.DeserializeNoMaskPolicyType(element, options); + } + } + return UnknownBaseRedactionPolicy.DeserializeUnknownBaseRedactionPolicy(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 BaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBaseRedactionPolicy(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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs similarity index 59% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs index d0faa0838e2c..658e1f9e4705 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs @@ -11,11 +11,11 @@ namespace Azure.AI.Language.Text { /// - /// This object contains information of the detected entity components. The possible component types may expand in the future. Parsing code should handle unexpected values gracefully - /// 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 abstract base class for RedactionPolicy. + /// 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 EntityComponentInformation + public abstract partial class BaseRedactionPolicy { /// /// Keeps track of any properties unknown to the library. @@ -49,21 +49,21 @@ public abstract partial class EntityComponentInformation /// private protected IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - protected EntityComponentInformation() + /// Initializes a new instance of . + protected BaseRedactionPolicy() { } - /// Initializes a new instance of . - /// Kind of entity component. + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. /// Keeps track of any properties unknown to the library. - internal EntityComponentInformation(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData) + internal BaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) { - EntityComponentKind = entityComponentKind; + PolicyKind = policyKind; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Kind of entity component. - internal EntityComponentKind EntityComponentKind { get; set; } + /// The entity RedactionPolicy object kind. + internal RedactionPolicyKind PolicyKind { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.Serialization.cs new file mode 100644 index 000000000000..1d60c67eee05 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.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.AI.Language.Text +{ + public partial class CharacterMaskPolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(CharacterMaskPolicyType)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RedactionCharacter)) + { + writer.WritePropertyName("redactionCharacter"u8); + writer.WriteStringValue(RedactionCharacter.Value.ToString()); + } + } + + CharacterMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); + } + + internal static CharacterMaskPolicyType DeserializeCharacterMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionCharacter? redactionCharacter = default; + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redactionCharacter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionCharacter = new RedactionCharacter(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CharacterMaskPolicyType(policyKind, serializedAdditionalRawData, redactionCharacter); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support writing '{options.Format}' format."); + } + } + + CharacterMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} 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 new CharacterMaskPolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCharacterMaskPolicyType(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.cs new file mode 100644 index 000000000000..1b078201bf57 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Represents the policy of redacting with a redaction character. + public partial class CharacterMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public CharacterMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.CharacterMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + internal CharacterMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData, RedactionCharacter? redactionCharacter) : base(policyKind, serializedAdditionalRawData) + { + RedactionCharacter = redactionCharacter; + } + + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + public RedactionCharacter? RedactionCharacter { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ClassificationType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ClassificationType.cs deleted file mode 100644 index f61a5f789708..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ClassificationType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Language.Text -{ - /// Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. - public readonly partial struct ClassificationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ClassificationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MultiValue = "Multi"; - private const string SingleValue = "Single"; - - /// Multi selection. - public static ClassificationType Multi { get; } = new ClassificationType(MultiValue); - /// Single selection. - public static ClassificationType Single { get; } = new ClassificationType(SingleValue); - /// Determines if two values are the same. - public static bool operator ==(ClassificationType left, ClassificationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ClassificationType left, ClassificationType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ClassificationType(string value) => new ClassificationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ClassificationType other && Equals(other); - /// - public bool Equals(ClassificationType 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.cs deleted file mode 100644 index 65e6e32a2312..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// An object representing the task definition for an Custom Abstractive Summarization task. - public partial class CustomAbstractiveSummarizationOperationAction : AnalyzeTextOperationAction - { - /// Initializes a new instance of . - /// Parameters for the Custom Abstractive Summarization task. - /// is null. - public CustomAbstractiveSummarizationOperationAction(CustomAbstractiveSummarizationActionContent actionContent) - { - Argument.AssertNotNull(actionContent, nameof(actionContent)); - - Kind = AnalyzeTextOperationActionKind.CustomAbstractiveSummarization; - ActionContent = actionContent; - } - - /// Initializes a new instance of . - /// task name. - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Parameters for the Custom Abstractive Summarization task. - internal CustomAbstractiveSummarizationOperationAction(string name, AnalyzeTextOperationActionKind kind, IDictionary serializedAdditionalRawData, CustomAbstractiveSummarizationActionContent actionContent) : base(name, kind, serializedAdditionalRawData) - { - ActionContent = actionContent; - } - - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationOperationAction() - { - } - - /// Parameters for the Custom Abstractive Summarization task. - public CustomAbstractiveSummarizationActionContent ActionContent { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.cs deleted file mode 100644 index 6e882c50176b..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// An object representing the results for an Custom Abstractive Summarization task. - public partial class CustomAbstractiveSummarizationOperationResult : AnalyzeTextOperationResult - { - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// Results of the task. - /// is null. - internal CustomAbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomAbstractiveSummarizationResult results) : base(lastUpdateDateTime, status) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextOperationResultsKind.CustomAbstractiveSummarizationOperationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Kind of the task. - /// Keeps track of any properties unknown to the library. - /// Results of the task. - internal CustomAbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomAbstractiveSummarizationResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationOperationResult() - { - } - - /// Results of the task. - public CustomAbstractiveSummarizationResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs deleted file mode 100644 index 5d77cb712f9f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomAbstractiveSummarizationResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics, options); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomAbstractiveSummarizationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement, options); - } - - internal static CustomAbstractiveSummarizationResult DeserializeCustomAbstractiveSummarizationResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList documents = default; - IReadOnlyList errors = default; - RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AbstractiveSummaryActionResult.DeserializeAbstractiveSummaryActionResult(item, options)); - } - documents = array; - continue; - } - if (property.NameEquals("errors"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentError.DeserializeDocumentError(item, options)); - } - errors = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationResult( - documents, - errors, - statistics, - projectName, - deploymentName, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support writing '{options.Format}' format."); - } - } - - CustomAbstractiveSummarizationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} 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 CustomAbstractiveSummarizationResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationResult(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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.Serialization.cs similarity index 76% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.Serialization.cs index 663ec166c845..a43f219fe83d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class CustomEntitiesActionResult : IUtf8JsonSerializable, IJsonModel + public partial class CustomEntitiesResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -74,19 +74,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomEntitiesActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CustomEntitiesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomEntitiesActionResult(document.RootElement, options); + return DeserializeCustomEntitiesResult(document.RootElement, options); } - internal static CustomEntitiesActionResult DeserializeCustomEntitiesActionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static CustomEntitiesResult DeserializeCustomEntitiesResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -148,7 +148,7 @@ internal static CustomEntitiesActionResult DeserializeCustomEntitiesActionResult } } serializedAdditionalRawData = rawDataDictionary; - return new CustomEntitiesActionResult( + return new CustomEntitiesResult( errors, statistics, projectName, @@ -157,43 +157,43 @@ internal static CustomEntitiesActionResult DeserializeCustomEntitiesActionResult serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support writing '{options.Format}' format."); } } - CustomEntitiesActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CustomEntitiesResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomEntitiesActionResult(document.RootElement, options); + return DeserializeCustomEntitiesResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomEntitiesActionResult FromResponse(Response response) + internal static CustomEntitiesResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomEntitiesActionResult(document.RootElement); + return DeserializeCustomEntitiesResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.cs similarity index 83% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.cs index f4c987c06704..19599bee781b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the list of detected custom entities result for the documents along with detected language. - public partial class CustomEntitiesActionResult + /// Contains the list of detected custom entities result for the documents. + public partial class CustomEntitiesResult { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ public partial class CustomEntitiesActionResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Enumeration of the document results with detected language. + /// Enumeration of the document results. /// , , or is null. - internal CustomEntitiesActionResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) + internal CustomEntitiesResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(projectName, nameof(projectName)); @@ -65,14 +65,14 @@ internal CustomEntitiesActionResult(IEnumerable errors, string pr Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Enumeration of the document results with detected language. + /// Enumeration of the document results. /// Keeps track of any properties unknown to the library. - internal CustomEntitiesActionResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal CustomEntitiesResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -82,8 +82,8 @@ internal CustomEntitiesActionResult(IReadOnlyList errors, Request _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomEntitiesActionResult() + /// Initializes a new instance of for deserialization. + internal CustomEntitiesResult() { } @@ -95,7 +95,7 @@ internal CustomEntitiesActionResult() public string ProjectName { get; } /// This field indicates the deployment name for the model. public string DeploymentName { get; } - /// Enumeration of the document results with detected language. + /// Enumeration of the document results. public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs index 9e4dbbc79eec..d8e7709ca902 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs @@ -59,7 +59,7 @@ internal static CustomEntityRecognitionOperationResult DeserializeCustomEntityRe { return null; } - CustomEntitiesActionResult results = default; + CustomEntitiesResult results = default; DateTimeOffset lastUpdateDateTime = default; TextActionState status = default; string taskName = default; @@ -70,7 +70,7 @@ internal static CustomEntityRecognitionOperationResult DeserializeCustomEntityRe { if (property.NameEquals("results"u8)) { - results = CustomEntitiesActionResult.DeserializeCustomEntitiesActionResult(property.Value, options); + results = CustomEntitiesResult.DeserializeCustomEntitiesResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs index 6507130692f4..b53830703ffc 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs @@ -18,7 +18,7 @@ public partial class CustomEntityRecognitionOperationResult : AnalyzeTextOperati /// The status of the task at the mentioned last update time. /// List of results. /// is null. - internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomEntitiesActionResult results) : base(lastUpdateDateTime, status) + internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomEntitiesResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -33,7 +33,7 @@ internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTim /// Kind of the task. /// Keeps track of any properties unknown to the library. /// List of results. - internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomEntitiesActionResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) + internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomEntitiesResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) { Results = results; } @@ -44,6 +44,6 @@ internal CustomEntityRecognitionOperationResult() } /// List of results. - public CustomEntitiesActionResult Results { get; } + public CustomEntitiesResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.cs deleted file mode 100644 index e2d7f93f3c5f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Supported parameters for a custom Healthcare task. - public partial class CustomHealthcareActionContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomHealthcareActionContent(string projectName, string deploymentName) - { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). - /// Keeps track of any properties unknown to the library. - internal CustomHealthcareActionContent(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType, IDictionary serializedAdditionalRawData) - { - LoggingOptOut = loggingOptOut; - ProjectName = projectName; - DeploymentName = deploymentName; - StringIndexType = stringIndexType; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomHealthcareActionContent() - { - } - - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). - public StringIndexType? StringIndexType { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.cs deleted file mode 100644 index a1c4ad499e73..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Contains the custom healthcare task definition. - public partial class CustomHealthcareOperationAction : AnalyzeTextOperationAction - { - /// Initializes a new instance of . - public CustomHealthcareOperationAction() - { - Kind = AnalyzeTextOperationActionKind.CustomHealthcare; - } - - /// Initializes a new instance of . - /// task name. - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Contains the custom healthcare task parameters. - internal CustomHealthcareOperationAction(string name, AnalyzeTextOperationActionKind kind, IDictionary serializedAdditionalRawData, CustomHealthcareActionContent actionContent) : base(name, kind, serializedAdditionalRawData) - { - ActionContent = actionContent; - } - - /// Contains the custom healthcare task parameters. - public CustomHealthcareActionContent ActionContent { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.cs deleted file mode 100644 index af608625031b..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Contains the custom healthcare job result. - public partial class CustomHealthcareOperationResult : AnalyzeTextOperationResult - { - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// Contains the list of document results. - /// is null. - internal CustomHealthcareOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomHealthcareResult results) : base(lastUpdateDateTime, status) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextOperationResultsKind.CustomHealthcareOperationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Kind of the task. - /// Keeps track of any properties unknown to the library. - /// Contains the list of document results. - internal CustomHealthcareOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomHealthcareResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal CustomHealthcareOperationResult() - { - } - - /// Contains the list of document results. - public CustomHealthcareResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.Serialization.cs similarity index 75% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.Serialization.cs index f32ba7a2607b..12337330632a 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class CustomLabelClassificationActionResult : IUtf8JsonSerializable, IJsonModel + public partial class CustomLabelClassificationResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writ /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -74,19 +74,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomLabelClassificationActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CustomLabelClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomLabelClassificationActionResult(document.RootElement, options); + return DeserializeCustomLabelClassificationResult(document.RootElement, options); } - internal static CustomLabelClassificationActionResult DeserializeCustomLabelClassificationActionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static CustomLabelClassificationResult DeserializeCustomLabelClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -148,7 +148,7 @@ internal static CustomLabelClassificationActionResult DeserializeCustomLabelClas } } serializedAdditionalRawData = rawDataDictionary; - return new CustomLabelClassificationActionResult( + return new CustomLabelClassificationResult( errors, statistics, projectName, @@ -157,43 +157,43 @@ internal static CustomLabelClassificationActionResult DeserializeCustomLabelClas serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support writing '{options.Format}' format."); } } - CustomLabelClassificationActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CustomLabelClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomLabelClassificationActionResult(document.RootElement, options); + return DeserializeCustomLabelClassificationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomLabelClassificationActionResult FromResponse(Response response) + internal static CustomLabelClassificationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomLabelClassificationActionResult(document.RootElement); + return DeserializeCustomLabelClassificationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.cs similarity index 83% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.cs index be06d2b035fe..b88ada7b09e8 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the custom label classification with detected language results. - public partial class CustomLabelClassificationActionResult + /// Contains the custom label classification results. + public partial class CustomLabelClassificationResult { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ public partial class CustomLabelClassificationActionResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. /// , , or is null. - internal CustomLabelClassificationActionResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) + internal CustomLabelClassificationResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(projectName, nameof(projectName)); @@ -65,14 +65,14 @@ internal CustomLabelClassificationActionResult(IEnumerable errors Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. /// Keeps track of any properties unknown to the library. - internal CustomLabelClassificationActionResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal CustomLabelClassificationResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -82,8 +82,8 @@ internal CustomLabelClassificationActionResult(IReadOnlyList erro _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomLabelClassificationActionResult() + /// Initializes a new instance of for deserialization. + internal CustomLabelClassificationResult() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs index 7c55c154577e..759ff49f5c17 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs @@ -59,7 +59,7 @@ internal static CustomMultiLabelClassificationOperationResult DeserializeCustomM { return null; } - CustomLabelClassificationActionResult results = default; + CustomLabelClassificationResult results = default; DateTimeOffset lastUpdateDateTime = default; TextActionState status = default; string taskName = default; @@ -70,7 +70,7 @@ internal static CustomMultiLabelClassificationOperationResult DeserializeCustomM { if (property.NameEquals("results"u8)) { - results = CustomLabelClassificationActionResult.DeserializeCustomLabelClassificationActionResult(property.Value, options); + results = CustomLabelClassificationResult.DeserializeCustomLabelClassificationResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs index ef2fd7798612..89d10a35d9a0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs @@ -18,7 +18,7 @@ public partial class CustomMultiLabelClassificationOperationResult : AnalyzeText /// The status of the task at the mentioned last update time. /// List of results. /// is null. - internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status) + internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -33,7 +33,7 @@ internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdate /// Kind of the task. /// Keeps track of any properties unknown to the library. /// List of results. - internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) + internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) { Results = results; } @@ -44,6 +44,6 @@ internal CustomMultiLabelClassificationOperationResult() } /// List of results. - public CustomLabelClassificationActionResult Results { get; } + public CustomLabelClassificationResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.cs deleted file mode 100644 index a52f147e2e37..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// A document's sentence custom sentiment. - public partial class CustomSentenceSentiment - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// 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 sentence text. - /// The predicted Sentiment for the sentence. - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The target offset from the start of the sentence. - /// The length of the target. - /// or is null. - internal CustomSentenceSentiment(string text, SentenceSentimentValue sentiment, SentimentConfidenceScores confidenceScores, int offset, int length) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); - - Text = text; - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Offset = offset; - Length = length; - } - - /// Initializes a new instance of . - /// The sentence text. - /// The predicted Sentiment for the sentence. - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The target offset from the start of the sentence. - /// The length of the target. - /// Keeps track of any properties unknown to the library. - internal CustomSentenceSentiment(string text, SentenceSentimentValue sentiment, SentimentConfidenceScores confidenceScores, int offset, int length, IDictionary serializedAdditionalRawData) - { - Text = text; - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Offset = offset; - Length = length; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentenceSentiment() - { - } - - /// The sentence text. - public string Text { get; } - /// The predicted Sentiment for the sentence. - public SentenceSentimentValue Sentiment { get; } - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - public SentimentConfidenceScores ConfidenceScores { get; } - /// The target offset from the start of the sentence. - public int Offset { get; } - /// The length of the target. - public int Length { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.cs deleted file mode 100644 index 7268d704b104..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Use custom models to ease the process of sentiment analysis from documents like product reviews. - public partial class CustomSentimentAnalysisOperationAction : AnalyzeTextOperationAction - { - /// Initializes a new instance of . - public CustomSentimentAnalysisOperationAction() - { - Kind = AnalyzeTextOperationActionKind.CustomSentimentAnalysis; - } - - /// Initializes a new instance of . - /// task name. - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Custom Sentiment Analysis task parameters. - internal CustomSentimentAnalysisOperationAction(string name, AnalyzeTextOperationActionKind kind, IDictionary serializedAdditionalRawData, CustomSentimentAnalysisActionContent actionContent) : base(name, kind, serializedAdditionalRawData) - { - ActionContent = actionContent; - } - - /// Custom Sentiment Analysis task parameters. - public CustomSentimentAnalysisActionContent ActionContent { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.cs deleted file mode 100644 index 1da5737b50fb..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Custom Sentiment Analysis Analyze Text long tunning operation result object. - public partial class CustomSentimentAnalysisOperationResult : AnalyzeTextOperationResult - { - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// Results of the task. - /// is null. - internal CustomSentimentAnalysisOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomSentimentAnalysisResult results) : base(lastUpdateDateTime, status) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextOperationResultsKind.CustomSentimentAnalysisOperationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Kind of the task. - /// Keeps track of any properties unknown to the library. - /// Results of the task. - internal CustomSentimentAnalysisOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomSentimentAnalysisResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisOperationResult() - { - } - - /// Results of the task. - public CustomSentimentAnalysisResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.cs deleted file mode 100644 index f725b8b09f1c..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.cs +++ /dev/null @@ -1,101 +0,0 @@ -// 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.AI.Language.Text -{ - /// Custom Sentiment analysis results for the input documents. - public partial class CustomSentimentAnalysisResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// The custom sentiment analysis results for each document in the input. - /// , , or is null. - internal CustomSentimentAnalysisResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) - { - Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(documents, nameof(documents)); - - Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; - Documents = documents.ToList(); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// The custom sentiment analysis results for each document in the input. - /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) - { - Errors = errors; - Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; - Documents = documents; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisResult() - { - } - - /// Errors by document id. - public IReadOnlyList Errors { get; } - /// if showStats=true was specified in the request this field will contain information about the request payload. - public RequestStatistics Statistics { get; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// The custom sentiment analysis results for each document in the input. - public IReadOnlyList Documents { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.cs deleted file mode 100644 index 17b9a6602492..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.cs +++ /dev/null @@ -1,111 +0,0 @@ -// 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.AI.Language.Text -{ - /// Custom Sentiment analysis result for a specific document. - public partial class CustomSentimentAnalysisResultDocument - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The document's sentences sentiment. - /// , , or is null. - internal CustomSentimentAnalysisResultDocument(string id, IEnumerable warnings, DocumentSentiment sentiment, SentimentConfidenceScores confidenceScores, IEnumerable sentences) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); - Argument.AssertNotNull(sentences, nameof(sentences)); - - Id = id; - Warnings = warnings.ToList(); - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Sentences = sentences.ToList(); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The document's sentences sentiment. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisResultDocument(string id, IReadOnlyList warnings, DocumentStatistics statistics, DocumentSentiment sentiment, SentimentConfidenceScores confidenceScores, IReadOnlyList sentences, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) - { - Id = id; - Warnings = warnings; - Statistics = statistics; - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Sentences = sentences; - DetectedLanguage = detectedLanguage; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisResultDocument() - { - } - - /// Unique, non-empty document identifier. - public string Id { get; } - /// Warnings encountered while processing document. - public IReadOnlyList Warnings { get; } - /// if showStats=true was specified in the request this field will contain information about the document payload. - public DocumentStatistics Statistics { get; } - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - public DocumentSentiment Sentiment { get; } - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - public SentimentConfidenceScores ConfidenceScores { get; } - /// The document's sentences sentiment. - public IReadOnlyList Sentences { get; } - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - public DetectedLanguage DetectedLanguage { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs index 17042c6ef615..0874c3f9ba71 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs @@ -59,7 +59,7 @@ internal static CustomSingleLabelClassificationOperationResult DeserializeCustom { return null; } - CustomLabelClassificationActionResult results = default; + CustomLabelClassificationResult results = default; DateTimeOffset lastUpdateDateTime = default; TextActionState status = default; string taskName = default; @@ -70,7 +70,7 @@ internal static CustomSingleLabelClassificationOperationResult DeserializeCustom { if (property.NameEquals("results"u8)) { - results = CustomLabelClassificationActionResult.DeserializeCustomLabelClassificationActionResult(property.Value, options); + results = CustomLabelClassificationResult.DeserializeCustomLabelClassificationResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs index c191cced3d0d..4e58093ed4b5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs @@ -18,7 +18,7 @@ public partial class CustomSingleLabelClassificationOperationResult : AnalyzeTex /// The status of the task at the mentioned last update time. /// List of results. /// is null. - internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status) + internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -33,7 +33,7 @@ internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdat /// Kind of the task. /// Keeps track of any properties unknown to the library. /// List of results. - internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) + internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) { Results = results; } @@ -44,6 +44,6 @@ internal CustomSingleLabelClassificationOperationResult() } /// List of results. - public CustomLabelClassificationActionResult Results { get; } + public CustomLabelClassificationResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs index e56bb77f7d92..9ec63a590914 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs @@ -40,15 +40,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Iso6391Name); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); - if (Optional.IsDefined(Script)) + if (Optional.IsDefined(ScriptName)) { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script.Value.ToString()); + writer.WritePropertyName("scriptName"u8); + writer.WriteStringValue(ScriptName.Value.ToString()); } - if (Optional.IsDefined(ScriptCode)) + if (Optional.IsDefined(ScriptIso15924Code)) { - writer.WritePropertyName("scriptCode"u8); - writer.WriteStringValue(ScriptCode.Value.ToString()); + writer.WritePropertyName("scriptIso15924Code"u8); + writer.WriteStringValue(ScriptIso15924Code.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -90,8 +90,8 @@ internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element string name = default; string iso6391Name = default; double confidenceScore = default; - ScriptKind? script = default; - ScriptCode? scriptCode = default; + ScriptKind? scriptName = default; + ScriptCode? scriptIso15924Code = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,22 +111,22 @@ internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element confidenceScore = property.Value.GetDouble(); continue; } - if (property.NameEquals("script"u8)) + if (property.NameEquals("scriptName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - script = new ScriptKind(property.Value.GetString()); + scriptName = new ScriptKind(property.Value.GetString()); continue; } - if (property.NameEquals("scriptCode"u8)) + if (property.NameEquals("scriptIso15924Code"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - scriptCode = new ScriptCode(property.Value.GetString()); + scriptIso15924Code = new ScriptCode(property.Value.GetString()); continue; } if (options.Format != "W") @@ -139,8 +139,8 @@ internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element name, iso6391Name, confidenceScore, - script, - scriptCode, + scriptName, + scriptIso15924Code, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs index b7b5598047aa..914edf38c323 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs @@ -64,16 +64,16 @@ internal DetectedLanguage(string name, string iso6391Name, double confidenceScor /// Long name of a detected language (e.g. English, French). /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - /// Identifies the script of the input document. - /// Identifies the script of the input document. + /// Identifies the script name of the input document according to the ISO 15924 standard. + /// Identifies the script code of the input document according to the ISO 15924 standard. /// Keeps track of any properties unknown to the library. - internal DetectedLanguage(string name, string iso6391Name, double confidenceScore, ScriptKind? script, ScriptCode? scriptCode, IDictionary serializedAdditionalRawData) + internal DetectedLanguage(string name, string iso6391Name, double confidenceScore, ScriptKind? scriptName, ScriptCode? scriptIso15924Code, IDictionary serializedAdditionalRawData) { Name = name; Iso6391Name = iso6391Name; ConfidenceScore = confidenceScore; - Script = script; - ScriptCode = scriptCode; + ScriptName = scriptName; + ScriptIso15924Code = scriptIso15924Code; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -88,9 +88,9 @@ internal DetectedLanguage() public string Iso6391Name { get; } /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. public double ConfidenceScore { get; } - /// Identifies the script of the input document. - public ScriptKind? Script { get; } - /// Identifies the script of the input document. - public ScriptCode? ScriptCode { get; } + /// Identifies the script name of the input document according to the ISO 15924 standard. + public ScriptKind? ScriptName { get; } + /// Identifies the script code of the input document according to the ISO 15924 standard. + public ScriptCode? ScriptIso15924Code { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml index cbd007ade805..9f9295f90d52 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml @@ -9,32 +9,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput -{ - TextInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") - { - Language = "en", - }, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") - { - Language = "en", - }}, - }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) - { - ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, - }, -}; -Response response = await client.AnalyzeTextAsync(analyzeTextInput); -]]> -This sample shows how to call AnalyzeTextAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - AnalyzeTextInput analyzeTextInput = new TextEntityLinkingInput { TextInput = new MultiLanguageTextInput @@ -274,13 +248,7 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") - { - Language = "en", - }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") - { - Language = "en", - }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") { Language = "en", }}, @@ -288,7 +256,7 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new EntityMaskPolicyType(), }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); @@ -317,6 +285,10 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput ActionContent = new PiiActionContent { ModelVersion = "latest", + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); @@ -327,51 +299,53 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") { Language = "en", }}, }, - ActionContent = new SentimentAnalysisActionContent + ActionContent = new PiiActionContent { ModelVersion = "latest", }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); -]]> - - - -This sample shows how to call AnalyzeText. +]]> +This sample shows how to call AnalyzeTextAsync. "); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput +AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") - { - Language = "en", - }, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") + MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") { Language = "en", }}, }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) + ActionContent = new SentimentAnalysisActionContent { ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, }, }; -Response response = client.AnalyzeText(analyzeTextInput); -]]> +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> + + + This sample shows how to call AnalyzeText. "); @@ -613,6 +587,29 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionPolicy = new EntityMaskPolicyType(), + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput { TextInput = new MultiLanguageTextInput @@ -631,7 +628,10 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = client.AnalyzeText(analyzeTextInput); @@ -695,51 +695,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - kind = "DynamicClassification", - parameters = new - { - categories = new object[] - { - "Health", - "Politics", - "Music", - "Sports" - }, - classificationType = "Multi", - modelVersion = "latest", - }, - analysisInput = new - { - documents = new object[] - { - new - { - id = "1", - language = "en", - text = "The WHO is issuing a warning about Monkey Pox.", - }, - new - { - id = "2", - language = "en", - text = "Mo Salah plays in Liverpool FC in England.", - } - }, - }, -}); -Response response = await client.AnalyzeTextAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -]]> -This sample shows how to call AnalyzeTextAsync and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new { kind = "EntityLinking", @@ -1127,7 +1082,10 @@ using RequestContent content = RequestContent.Create(new parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "entityMask", + }, }, analysisInput = new { @@ -1137,19 +1095,7 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "My SSN is 859-98-0987", - }, - new - { - id = "2", - language = "en", - text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", - }, - new - { - id = "3", - language = "en", - text = "Is 998.214.865-68 your Brazilian CPF number?", + text = "My name is John Doe My phone number is 424 878 9192", } }, }, @@ -1171,6 +1117,11 @@ using RequestContent content = RequestContent.Create(new parameters = new { modelVersion = "latest", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1210,7 +1161,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "SentimentAnalysis", + kind = "PiiEntityRecognition", parameters = new { modelVersion = "latest", @@ -1223,7 +1174,19 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", } }, }, @@ -1232,11 +1195,8 @@ Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> - - - -This sample shows how to call AnalyzeText and parse the result. +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1244,17 +1204,9 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "SentimentAnalysis", parameters = new { - categories = new object[] - { - "Health", - "Politics", - "Music", - "Sports" - }, - classificationType = "Multi", modelVersion = "latest", }, analysisInput = new @@ -1265,22 +1217,19 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "The WHO is issuing a warning about Monkey Pox.", - }, - new - { - id = "2", - language = "en", - text = "Mo Salah plays in Liverpool FC in England.", + text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", } }, }, }); -Response response = client.AnalyzeText(content); +Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> +]]> + + + This sample shows how to call AnalyzeText and parse the result. "); @@ -1674,7 +1623,46 @@ using RequestContent content = RequestContent.Create(new parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "entityMask", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "My name is John Doe My phone number is 424 878 9192", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1813,22 +1801,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); -]]> -This sample shows how to call AnalyzeTextOperationStatusAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); -]]> -This sample shows how to call AnalyzeTextOperationStatusAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd")); ]]> This sample shows how to call AnalyzeTextOperationStatusAsync. @@ -1872,22 +1844,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); -]]> -This sample shows how to call AnalyzeTextOperationStatus. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); -]]> -This sample shows how to call AnalyzeTextOperationStatus. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd")); ]]> This sample shows how to call AnalyzeTextOperationStatus. @@ -1961,7 +1917,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); +Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1979,7 +1935,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); +Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1990,14 +1946,17 @@ Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString( Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatusAsync and parse the result. +]]> + + + +This sample shows how to call AnalyzeTextOperationStatus and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null); +Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2009,34 +1968,13 @@ Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); ]]> -This sample shows how to call AnalyzeTextOperationStatusAsync and parse the result. +This sample shows how to call AnalyzeTextOperationStatus and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> - - - -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); +Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2072,60 +2010,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2178,7 +2062,8 @@ Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Com { ActionContent = new AbstractiveSummarizationActionContent { - SentenceCount = 1, + SummaryLength = SummaryLengthBucket.Medium, + Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2192,28 +2077,20 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") - { - Language = "en", - }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new EntitiesOperationAction + new AbstractiveSummarizationOperationAction { - ActionContent = new EntitiesActionContent + ActionContent = new AbstractiveSummarizationActionContent { - ModelVersion = "latest", + SentenceCount = 1, }, - Name = "Recognize Entities", - }, - new CustomEntitiesOperationAction - { - ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), - Name = "Recognize US Regions", + Name = "Document Abstractive Summarization Task 1", } }); ]]> @@ -2225,58 +2102,28 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") { Language = "en", - }}, -}; -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) - { - Name = "Custom Document Abstractive Summarization Task 1", - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") + }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new CustomHealthcareOperationAction - { - ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + new EntitiesOperationAction { - Language = "en", - }}, -}; -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomSentimentAnalysisOperationAction + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + }, + Name = "Recognize Entities", + }, + new CustomEntitiesOperationAction { - ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), + ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), + Name = "Recognize US Regions", } }); ]]> @@ -2352,7 +2199,8 @@ Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, tex { ActionContent = new AbstractiveSummarizationActionContent { - SentenceCount = 1, + SummaryLength = SummaryLengthBucket.Medium, + Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2366,28 +2214,20 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") - { - Language = "en", - }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new EntitiesOperationAction + new AbstractiveSummarizationOperationAction { - ActionContent = new EntitiesActionContent + ActionContent = new AbstractiveSummarizationActionContent { - ModelVersion = "latest", + SentenceCount = 1, }, - Name = "Recognize Entities", - }, - new CustomEntitiesOperationAction - { - ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), - Name = "Recognize US Regions", + Name = "Document Abstractive Summarization Task 1", } }); ]]> @@ -2399,58 +2239,28 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") { Language = "en", - }}, -}; -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) - { - Name = "Custom Document Abstractive Summarization Task 1", - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") + }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new CustomHealthcareOperationAction - { - ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + new EntitiesOperationAction { - Language = "en", - }}, -}; -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomSentimentAnalysisOperationAction + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + }, + Name = "Recognize Entities", + }, + new CustomEntitiesOperationAction { - ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), + ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), + Name = "Recognize US Regions", } }); ]]> @@ -2536,7 +2346,8 @@ using RequestContent content = RequestContent.Create(new taskName = "Document Abstractive Summarization Task 1", parameters = new { - sentenceCount = 1, + summaryLength = "medium", + instruction = "XYZ-code", }, } }, @@ -2551,7 +2362,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2560,13 +2371,7 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "I had a wonderful trip to Seattle last week.", - }, - new - { - id = "2", - language = "en", - text = "I'm flying to NYC tomorrow. See you there.", + text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2574,21 +2379,11 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "EntityRecognition", - taskName = "Recognize Entities", - parameters = new - { - modelVersion = "latest", - }, - }, - new - { - kind = "CustomEntityRecognition", - taskName = "Recognize US Regions", + kind = "AbstractiveSummarization", + taskName = "Document Abstractive Summarization Task 1", parameters = new { - projectName = "MyProject", - deploymentName = "MyDeployment", + sentenceCount = 1, }, } }, @@ -2603,7 +2398,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Document Custom Abstractive Summarization Task Example", + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] @@ -2612,43 +2407,13 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", - } - }, - }, - tasks = new object[] - { - new - { - kind = "CustomAbstractiveSummarization", - taskName = "Custom Document Abstractive Summarization Task 1", - parameters = new - { - projectName = "my_project", - deploymentName = "my_deployment", + text = "I had a wonderful trip to Seattle last week.", }, - } - }, -}); -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { new { - text = "Prescribed 100mg ibuprofen, taken twice daily.", - id = "1", + id = "2", language = "en", + text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2656,46 +2421,21 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "CustomHealthcare", + kind = "EntityRecognition", + taskName = "Recognize Entities", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + modelVersion = "latest", }, - } - }, -}); -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { - new - { - text = "The food is great. But the service is bad.", - id = "1", - language = "en", - } }, - }, - tasks = new object[] - { new { - kind = "CustomSentimentAnalysis", + kind = "CustomEntityRecognition", + taskName = "Recognize US Regions", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + projectName = "MyProject", + deploymentName = "MyDeployment", }, } }, @@ -2804,7 +2544,8 @@ using RequestContent content = RequestContent.Create(new taskName = "Document Abstractive Summarization Task 1", parameters = new { - sentenceCount = 1, + summaryLength = "medium", + instruction = "XYZ-code", }, } }, @@ -2819,7 +2560,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2828,13 +2569,7 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "I had a wonderful trip to Seattle last week.", - }, - new - { - id = "2", - language = "en", - text = "I'm flying to NYC tomorrow. See you there.", + text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2842,21 +2577,11 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "EntityRecognition", - taskName = "Recognize Entities", - parameters = new - { - modelVersion = "latest", - }, - }, - new - { - kind = "CustomEntityRecognition", - taskName = "Recognize US Regions", + kind = "AbstractiveSummarization", + taskName = "Document Abstractive Summarization Task 1", parameters = new { - projectName = "MyProject", - deploymentName = "MyDeployment", + sentenceCount = 1, }, } }, @@ -2871,7 +2596,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Document Custom Abstractive Summarization Task Example", + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] @@ -2880,43 +2605,13 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", - } - }, - }, - tasks = new object[] - { - new - { - kind = "CustomAbstractiveSummarization", - taskName = "Custom Document Abstractive Summarization Task 1", - parameters = new - { - projectName = "my_project", - deploymentName = "my_deployment", + text = "I had a wonderful trip to Seattle last week.", }, - } - }, -}); -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { new { - text = "Prescribed 100mg ibuprofen, taken twice daily.", - id = "1", + id = "2", language = "en", + text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2924,46 +2619,21 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "CustomHealthcare", + kind = "EntityRecognition", + taskName = "Recognize Entities", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + modelVersion = "latest", }, - } - }, -}); -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { - new - { - text = "The food is great. But the service is bad.", - id = "1", - language = "en", - } }, - }, - tasks = new object[] - { new { - kind = "CustomSentimentAnalysis", + kind = "CustomEntityRecognition", + taskName = "Recognize US Regions", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + projectName = "MyProject", + deploymentName = "MyDeployment", }, } }, diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs deleted file mode 100644 index c786cfccc30f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs +++ /dev/null @@ -1,88 +0,0 @@ -// 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.AI.Language.Text -{ - /// Supported parameters for a Dynamic Classification task. - public partial class DynamicClassificationActionContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// 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 list of categories to which input is classified to. - /// is null. - public DynamicClassificationActionContent(IEnumerable categories) - { - Argument.AssertNotNull(categories, nameof(categories)); - - Categories = categories.ToList(); - } - - /// Initializes a new instance of . - /// logging opt out. - /// model version. - /// Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. - /// a list of categories to which input is classified to. - /// Keeps track of any properties unknown to the library. - internal DynamicClassificationActionContent(bool? loggingOptOut, string modelVersion, ClassificationType? classificationType, IList categories, IDictionary serializedAdditionalRawData) - { - LoggingOptOut = loggingOptOut; - ModelVersion = modelVersion; - ClassificationType = classificationType; - Categories = categories; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DynamicClassificationActionContent() - { - } - - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// model version. - public string ModelVersion { get; set; } - /// Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. - public ClassificationType? ClassificationType { get; set; } - /// a list of categories to which input is classified to. - public IList Categories { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadata.Serialization.cs similarity index 65% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadata.Serialization.cs index 462872384733..1f83b84f8080 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadata.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class DynamicClassificationDocumentResult : IUtf8JsonSerializable, IJsonModel + public partial class EntitiesDocumentResultWithMetadata : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadata)} does not support writing '{format}' format."); } writer.WritePropertyName("id"u8); @@ -48,9 +48,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("statistics"u8); writer.WriteObjectValue(Statistics, options); } - writer.WritePropertyName("classifications"u8); + writer.WritePropertyName("entities"u8); writer.WriteStartArray(); - foreach (var item in Classifications) + foreach (var item in Entities) { writer.WriteObjectValue(item, options); } @@ -72,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DynamicClassificationDocumentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntitiesDocumentResultWithMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadata)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationDocumentResult(document.RootElement, options); + return DeserializeEntitiesDocumentResultWithMetadata(document.RootElement, options); } - internal static DynamicClassificationDocumentResult DeserializeDynamicClassificationDocumentResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntitiesDocumentResultWithMetadata DeserializeEntitiesDocumentResultWithMetadata(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -95,7 +95,7 @@ internal static DynamicClassificationDocumentResult DeserializeDynamicClassifica string id = default; IReadOnlyList warnings = default; DocumentStatistics statistics = default; - IReadOnlyList classifications = default; + IReadOnlyList entities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -124,14 +124,14 @@ internal static DynamicClassificationDocumentResult DeserializeDynamicClassifica statistics = DocumentStatistics.DeserializeDocumentStatistics(property.Value, options); continue; } - if (property.NameEquals("classifications"u8)) + if (property.NameEquals("entities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ClassificationResult.DeserializeClassificationResult(item, options)); + array.Add(NamedEntityWithMetadata.DeserializeNamedEntityWithMetadata(item, options)); } - classifications = array; + entities = array; continue; } if (options.Format != "W") @@ -140,46 +140,46 @@ internal static DynamicClassificationDocumentResult DeserializeDynamicClassifica } } serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationDocumentResult(id, warnings, statistics, classifications, serializedAdditionalRawData); + return new EntitiesDocumentResultWithMetadata(id, warnings, statistics, entities, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadata)} does not support writing '{options.Format}' format."); } } - DynamicClassificationDocumentResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntitiesDocumentResultWithMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeDynamicClassificationDocumentResult(document.RootElement, options); + return DeserializeEntitiesDocumentResultWithMetadata(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadata)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DynamicClassificationDocumentResult FromResponse(Response response) + internal static EntitiesDocumentResultWithMetadata FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationDocumentResult(document.RootElement); + return DeserializeEntitiesDocumentResultWithMetadata(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadata.cs similarity index 67% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadata.cs index dcd6f4daef44..12eb02597c3b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadata.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the Dynamic Classification document result. - public partial class DynamicClassificationDocumentResult + /// Entity documents result with metadata. + public partial class EntitiesDocumentResultWithMetadata { /// /// Keeps track of any properties unknown to the library. @@ -46,39 +46,39 @@ public partial class DynamicClassificationDocumentResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. - /// Array of classification results. - /// , or is null. - internal DynamicClassificationDocumentResult(string id, IEnumerable warnings, IEnumerable classifications) + /// Recognized entities in the document. + /// , or is null. + internal EntitiesDocumentResultWithMetadata(string id, IEnumerable warnings, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(classifications, nameof(classifications)); + Argument.AssertNotNull(entities, nameof(entities)); Id = id; Warnings = warnings.ToList(); - Classifications = classifications.ToList(); + Entities = entities.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Array of classification results. + /// Recognized entities in the document. /// Keeps track of any properties unknown to the library. - internal DynamicClassificationDocumentResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList classifications, IDictionary serializedAdditionalRawData) + internal EntitiesDocumentResultWithMetadata(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; Statistics = statistics; - Classifications = classifications; + Entities = entities; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DynamicClassificationDocumentResult() + /// Initializes a new instance of for deserialization. + internal EntitiesDocumentResultWithMetadata() { } @@ -88,7 +88,7 @@ internal DynamicClassificationDocumentResult() public IReadOnlyList Warnings { get; } /// if showStats=true was specified in the request this field will contain information about the document payload. public DocumentStatistics Statistics { get; } - /// Array of classification results. - public IReadOnlyList Classifications { get; } + /// Recognized entities in the document. + public IReadOnlyList Entities { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs index 1138f92b9341..cf19c6068aab 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs @@ -95,7 +95,7 @@ internal static EntitiesResult DeserializeEntitiesResult(JsonElement element, Mo IReadOnlyList errors = default; RequestStatistics statistics = default; string modelVersion = default; - IReadOnlyList documents = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,10 +126,10 @@ internal static EntitiesResult DeserializeEntitiesResult(JsonElement element, Mo } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EntitiesDocumentResultWithMetadataDetectedLanguage.DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(item, options)); + array.Add(EntitiesDocumentResultWithMetadata.DeserializeEntitiesDocumentResultWithMetadata(item, options)); } documents = array; continue; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs index cef0b80c969c..6111c6f58223 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs @@ -51,7 +51,7 @@ public partial class EntitiesResult /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - internal EntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) + internal EntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); @@ -68,7 +68,7 @@ internal EntitiesResult(IEnumerable errors, string modelVersion, /// This field indicates which model is used for scoring. /// Response by document. /// Keeps track of any properties unknown to the library. - internal EntitiesResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal EntitiesResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -89,6 +89,6 @@ internal EntitiesResult() /// This field indicates which model is used for scoring. public string ModelVersion { get; } /// Response by document. - public IReadOnlyList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.Serialization.cs similarity index 68% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.Serialization.cs index f35a77a7bd7f..25f2a6b1eede 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class DynamicClassificationResult : IUtf8JsonSerializable, IJsonModel + public partial class EntitiesWithMetadataAutoResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -72,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DynamicClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntitiesWithMetadataAutoResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationResult(document.RootElement, options); + return DeserializeEntitiesWithMetadataAutoResult(document.RootElement, options); } - internal static DynamicClassificationResult DeserializeDynamicClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntitiesWithMetadataAutoResult DeserializeEntitiesWithMetadataAutoResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -95,7 +95,7 @@ internal static DynamicClassificationResult DeserializeDynamicClassificationResu IReadOnlyList errors = default; RequestStatistics statistics = default; string modelVersion = default; - IReadOnlyList documents = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,10 +126,10 @@ internal static DynamicClassificationResult DeserializeDynamicClassificationResu } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DynamicClassificationDocumentResult.DeserializeDynamicClassificationDocumentResult(item, options)); + array.Add(EntitiesDocumentResultWithMetadataDetectedLanguage.DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(item, options)); } documents = array; continue; @@ -140,46 +140,46 @@ internal static DynamicClassificationResult DeserializeDynamicClassificationResu } } serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationResult(errors, statistics, modelVersion, documents, serializedAdditionalRawData); + return new EntitiesWithMetadataAutoResult(errors, statistics, modelVersion, documents, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support writing '{options.Format}' format."); } } - DynamicClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntitiesWithMetadataAutoResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeDynamicClassificationResult(document.RootElement, options); + return DeserializeEntitiesWithMetadataAutoResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DynamicClassificationResult FromResponse(Response response) + internal static EntitiesWithMetadataAutoResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationResult(document.RootElement); + return DeserializeEntitiesWithMetadataAutoResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.cs similarity index 77% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.cs index 2bbb92c5e53d..f03f6877f9a7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the Dynamic Classification result. - public partial class DynamicClassificationResult + /// Contains the entity recognition task result. + public partial class EntitiesWithMetadataAutoResult { /// /// Keeps track of any properties unknown to the library. @@ -46,12 +46,12 @@ public partial class DynamicClassificationResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - internal DynamicClassificationResult(IEnumerable errors, string modelVersion, IEnumerable documents) + internal EntitiesWithMetadataAutoResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); @@ -62,13 +62,13 @@ internal DynamicClassificationResult(IEnumerable errors, string m Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. /// Keeps track of any properties unknown to the library. - internal DynamicClassificationResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal EntitiesWithMetadataAutoResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -77,8 +77,8 @@ internal DynamicClassificationResult(IReadOnlyList errors, Reques _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DynamicClassificationResult() + /// Initializes a new instance of for deserialization. + internal EntitiesWithMetadataAutoResult() { } @@ -89,6 +89,6 @@ internal DynamicClassificationResult() /// This field indicates which model is used for scoring. public string ModelVersion { get; } /// Response by document. - public IReadOnlyList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentKind.cs deleted file mode 100644 index 71668dddfd1a..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentKind.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Language.Text -{ - /// Kind of entity components supported. - internal readonly partial struct EntityComponentKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EntityComponentKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PrebuiltComponentValue = "PrebuiltComponent"; - private const string LearnedComponentValue = "LearnedComponent"; - private const string ListComponentValue = "ListComponent"; - - /// Prebuilt component. - public static EntityComponentKind PrebuiltComponent { get; } = new EntityComponentKind(PrebuiltComponentValue); - /// Learned component. - public static EntityComponentKind LearnedComponent { get; } = new EntityComponentKind(LearnedComponentValue); - /// List component. - public static EntityComponentKind ListComponent { get; } = new EntityComponentKind(ListComponentValue); - /// Determines if two values are the same. - public static bool operator ==(EntityComponentKind left, EntityComponentKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EntityComponentKind left, EntityComponentKind right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator EntityComponentKind(string value) => new EntityComponentKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EntityComponentKind other && Equals(other); - /// - public bool Equals(EntityComponentKind 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.Serialization.cs similarity index 57% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.Serialization.cs index 66f57eb2a87b..ac1da62b2e10 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - internal partial class UnknownEntityComponentInformation : IUtf8JsonSerializable, IJsonModel + public partial class EntityMaskPolicyType : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,28 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); } - EntityComponentInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntityMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeEntityMaskPolicyType(document.RootElement, options); } - internal static UnknownEntityComponentInformation DeserializeUnknownEntityComponentInformation(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntityMaskPolicyType DeserializeEntityMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -57,14 +57,14 @@ internal static UnknownEntityComponentInformation DeserializeUnknownEntityCompon { return null; } - EntityComponentKind entityComponentKind = "Unknown"; + RedactionPolicyKind policyKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -73,53 +73,53 @@ internal static UnknownEntityComponentInformation DeserializeUnknownEntityCompon } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownEntityComponentInformation(entityComponentKind, serializedAdditionalRawData); + return new EntityMaskPolicyType(policyKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support writing '{options.Format}' format."); } } - EntityComponentInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntityMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeEntityMaskPolicyType(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new UnknownEntityComponentInformation FromResponse(Response response) + internal static new EntityMaskPolicyType FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownEntityComponentInformation(document.RootElement); + return DeserializeEntityMaskPolicyType(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.cs new file mode 100644 index 000000000000..2f16c95093e8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Represents the policy of redacting PII with the entity type. + public partial class EntityMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public EntityMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.EntityMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal EntityMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.cs deleted file mode 100644 index b4309c19fe53..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// This object contains information of the learned component of the detected entity. - public partial class LearnedComponent : EntityComponentInformation - { - /// Initializes a new instance of . - internal LearnedComponent() - { - EntityComponentKind = EntityComponentKind.LearnedComponent; - } - - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - /// The learned component of an extracted entity type. - internal LearnedComponent(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData, string value) : base(entityComponentKind, serializedAdditionalRawData) - { - Value = value; - } - - /// The learned component of an extracted entity type. - public string Value { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.cs deleted file mode 100644 index d6f13e89e85e..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// This object contains information of the list component of the detected entity. - public partial class ListComponent : EntityComponentInformation - { - /// Initializes a new instance of . - internal ListComponent() - { - EntityComponentKind = EntityComponentKind.ListComponent; - } - - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - /// The list key of an extracted entity type. - internal ListComponent(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData, string value) : base(entityComponentKind, serializedAdditionalRawData) - { - Value = value; - } - - /// The list key of an extracted entity type. - public string Value { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs index c1ae7d426497..80133332b83f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs @@ -49,15 +49,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Length); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - writer.WritePropertyName("tags"u8); - writer.WriteStartArray(); - foreach (var item in Tags) + if (Optional.IsDefined(Type)) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartArray(); + foreach (var item in Tags) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -150,6 +156,10 @@ internal static NamedEntityWithMetadata DeserializeNamedEntityWithMetadata(JsonE } if (property.NameEquals("tags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -181,7 +191,7 @@ internal static NamedEntityWithMetadata DeserializeNamedEntityWithMetadata(JsonE length, confidenceScore, type, - tags, + tags ?? new ChangeTrackingList(), metadata, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs index 61cfe57317d5..8b6a0b3cfec7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.AI.Language.Text { @@ -52,23 +51,18 @@ public partial class NamedEntityWithMetadata /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. - /// List of entity tags. Tags are to express some similarities/affinity between entities. - /// , , or is null. - internal NamedEntityWithMetadata(string text, string category, int offset, int length, double confidenceScore, string type, IEnumerable tags) + /// or is null. + internal NamedEntityWithMetadata(string text, string category, int offset, int length, double confidenceScore) { Argument.AssertNotNull(text, nameof(text)); Argument.AssertNotNull(category, nameof(category)); - Argument.AssertNotNull(type, nameof(type)); - Argument.AssertNotNull(tags, nameof(tags)); Text = text; Category = category; Offset = offset; Length = length; ConfidenceScore = confidenceScore; - Type = type; - Tags = tags.ToList(); + Tags = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.Serialization.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.Serialization.cs index 13f35d298ae2..35dfdd62a487 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class LearnedComponent : IUtf8JsonSerializable, IJsonModel + public partial class NoMaskPolicyType : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,33 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(LearnedComponent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } } - LearnedComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + NoMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(LearnedComponent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeLearnedComponent(document.RootElement, options); + return DeserializeNoMaskPolicyType(document.RootElement, options); } - internal static LearnedComponent DeserializeLearnedComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static NoMaskPolicyType DeserializeNoMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +57,14 @@ internal static LearnedComponent DeserializeLearnedComponent(JsonElement element { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + RedactionPolicyKind policyKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -84,46 +73,46 @@ internal static LearnedComponent DeserializeLearnedComponent(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new LearnedComponent(entityComponentKind, serializedAdditionalRawData, value); + return new NoMaskPolicyType(policyKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(LearnedComponent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support writing '{options.Format}' format."); } } - LearnedComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + NoMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeLearnedComponent(document.RootElement, options); + return DeserializeNoMaskPolicyType(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(LearnedComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new LearnedComponent FromResponse(Response response) + internal static new NoMaskPolicyType FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeLearnedComponent(document.RootElement); + return DeserializeNoMaskPolicyType(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.cs new file mode 100644 index 000000000000..41ac586ad1cb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Represents the policy of not redacting found PII. + public partial class NoMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public NoMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.NoMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal NoMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs index 29c01556180a..d1533e25a7dd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs @@ -74,10 +74,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(RedactionCharacter)) + if (Optional.IsDefined(RedactionPolicy)) { - writer.WritePropertyName("redactionCharacter"u8); - writer.WriteStringValue(RedactionCharacter.Value.ToString()); + writer.WritePropertyName("redactionPolicy"u8); + writer.WriteObjectValue(RedactionPolicy, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -122,7 +122,7 @@ internal static PiiActionContent DeserializePiiActionContent(JsonElement element IList piiCategories = default; StringIndexType? stringIndexType = default; IList excludePiiCategories = default; - RedactionCharacter? redactionCharacter = default; + BaseRedactionPolicy redactionPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -187,13 +187,13 @@ internal static PiiActionContent DeserializePiiActionContent(JsonElement element excludePiiCategories = array; continue; } - if (property.NameEquals("redactionCharacter"u8)) + if (property.NameEquals("redactionPolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - redactionCharacter = new RedactionCharacter(property.Value.GetString()); + redactionPolicy = BaseRedactionPolicy.DeserializeBaseRedactionPolicy(property.Value, options); continue; } if (options.Format != "W") @@ -209,7 +209,7 @@ internal static PiiActionContent DeserializePiiActionContent(JsonElement element piiCategories ?? new ChangeTrackingList(), stringIndexType, excludePiiCategories ?? new ChangeTrackingList(), - redactionCharacter, + redactionPolicy, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs index 5fdce1559484..f87442aa7201 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs @@ -59,9 +59,13 @@ public PiiActionContent() /// Enumeration of PII categories to be returned in the response. /// StringIndexType to be used for analysis. /// Enumeration of PII categories to be excluded in the response. - /// Character to be used for redaction. Default in '*'. + /// + /// RedactionPolicy to be used on the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// /// Keeps track of any properties unknown to the library. - internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType, IList excludePiiCategories, RedactionCharacter? redactionCharacter, IDictionary serializedAdditionalRawData) + internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType, IList excludePiiCategories, BaseRedactionPolicy redactionPolicy, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; @@ -69,7 +73,7 @@ internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? d PiiCategories = piiCategories; StringIndexType = stringIndexType; ExcludePiiCategories = excludePiiCategories; - RedactionCharacter = redactionCharacter; + RedactionPolicy = redactionPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,7 +89,11 @@ internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? d public StringIndexType? StringIndexType { get; set; } /// Enumeration of PII categories to be excluded in the response. public IList ExcludePiiCategories { get; } - /// Character to be used for redaction. Default in '*'. - public RedactionCharacter? RedactionCharacter { get; set; } + /// + /// RedactionPolicy to be used on the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public BaseRedactionPolicy RedactionPolicy { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs index 4e53776765b5..cdb59bfa4115 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs @@ -103,7 +103,7 @@ internal static PiiActionResult DeserializePiiActionResult(JsonElement element, IReadOnlyList warnings = default; DocumentStatistics statistics = default; string redactedText = default; - IReadOnlyList entities = default; + IReadOnlyList entities = default; DetectedLanguage detectedLanguage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -140,10 +140,10 @@ internal static PiiActionResult DeserializePiiActionResult(JsonElement element, } if (property.NameEquals("entities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NamedEntity.DeserializeNamedEntity(item, options)); + array.Add(PiiEntityWithTags.DeserializePiiEntityWithTags(item, options)); } entities = array; continue; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs index 6c86b7ef74a9..7fdff5315f51 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs @@ -52,7 +52,7 @@ public partial class PiiActionResult /// Returns redacted text. /// Recognized entities in the document. /// , , or is null. - internal PiiActionResult(string id, IEnumerable warnings, string redactedText, IEnumerable entities) + internal PiiActionResult(string id, IEnumerable warnings, string redactedText, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); @@ -73,7 +73,7 @@ internal PiiActionResult(string id, IEnumerable warnings, strin /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// Keeps track of any properties unknown to the library. - internal PiiActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, string redactedText, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) + internal PiiActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, string redactedText, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; @@ -98,7 +98,7 @@ internal PiiActionResult() /// Returns redacted text. public string RedactedText { get; } /// Recognized entities in the document. - public IReadOnlyList Entities { get; } + public IReadOnlyList Entities { get; } /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. public DetectedLanguage DetectedLanguage { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntityWithTags.Serialization.cs similarity index 60% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntityWithTags.Serialization.cs index 9d796618c9c0..47d9baba3c28 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntityWithTags.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class CustomHealthcareEntity : IUtf8JsonSerializable, IJsonModel + public partial class PiiEntityWithTags : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(PiiEntityWithTags)} does not support writing '{format}' format."); } writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category.ToString()); + writer.WriteStringValue(Category); if (Optional.IsDefined(Subcategory)) { writer.WritePropertyName("subcategory"u8); @@ -49,35 +49,35 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Length); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); - if (Optional.IsDefined(Assertion)) + if (Optional.IsDefined(Type)) { - writer.WritePropertyName("assertion"u8); - writer.WriteObjectValue(Assertion, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - if (Optional.IsDefined(Name)) + if (Optional.IsCollectionDefined(Tags)) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsCollectionDefined(Links)) - { - writer.WritePropertyName("links"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartArray(); - foreach (var item in Links) + foreach (var item in Tags) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(EntityComponentInformation)) + if (Optional.IsDefined(Mask)) { - writer.WritePropertyName("entityComponentInformation"u8); - writer.WriteStartArray(); - foreach (var item in EntityComponentInformation) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WritePropertyName("mask"u8); + writer.WriteStringValue(Mask); + } + if (Optional.IsDefined(MaskOffset)) + { + writer.WritePropertyName("maskOffset"u8); + writer.WriteNumberValue(MaskOffset.Value); + } + if (Optional.IsDefined(MaskLength)) + { + writer.WritePropertyName("maskLength"u8); + writer.WriteNumberValue(MaskLength.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -96,19 +96,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + PiiEntityWithTags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(PiiEntityWithTags)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareEntity(document.RootElement, options); + return DeserializePiiEntityWithTags(document.RootElement, options); } - internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonElement element, ModelReaderWriterOptions options = null) + internal static PiiEntityWithTags DeserializePiiEntityWithTags(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -117,15 +117,16 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle return null; } string text = default; - HealthcareEntityCategory category = default; + string category = default; string subcategory = default; int offset = default; int length = default; double confidenceScore = default; - HealthcareAssertion assertion = default; - string name = default; - IReadOnlyList links = default; - IReadOnlyList entityComponentInformation = default; + string type = default; + IReadOnlyList tags = default; + string mask = default; + int? maskOffset = default; + int? maskLength = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -137,7 +138,7 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle } if (property.NameEquals("category"u8)) { - category = new HealthcareEntityCategory(property.Value.GetString()); + category = property.Value.GetString(); continue; } if (property.NameEquals("subcategory"u8)) @@ -160,46 +161,46 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle confidenceScore = property.Value.GetDouble(); continue; } - if (property.NameEquals("assertion"u8)) + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - assertion = HealthcareAssertion.DeserializeHealthcareAssertion(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EntityTag.DeserializeEntityTag(item, options)); + } + tags = array; continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("mask"u8)) { - name = property.Value.GetString(); + mask = property.Value.GetString(); continue; } - if (property.NameEquals("links"u8)) + if (property.NameEquals("maskOffset"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareEntityLink.DeserializeHealthcareEntityLink(item, options)); - } - links = array; + maskOffset = property.Value.GetInt32(); continue; } - if (property.NameEquals("entityComponentInformation"u8)) + if (property.NameEquals("maskLength"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Language.Text.EntityComponentInformation.DeserializeEntityComponentInformation(item, options)); - } - entityComponentInformation = array; + maskLength = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -208,57 +209,58 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareEntity( + return new PiiEntityWithTags( text, category, subcategory, offset, length, confidenceScore, - assertion, - name, - links ?? new ChangeTrackingList(), - entityComponentInformation ?? new ChangeTrackingList(), + type, + tags ?? new ChangeTrackingList(), + mask, + maskOffset, + maskLength, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(PiiEntityWithTags)} does not support writing '{options.Format}' format."); } } - CustomHealthcareEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + PiiEntityWithTags IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareEntity(document.RootElement, options); + return DeserializePiiEntityWithTags(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(PiiEntityWithTags)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomHealthcareEntity FromResponse(Response response) + internal static PiiEntityWithTags FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareEntity(document.RootElement); + return DeserializePiiEntityWithTags(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntityWithTags.cs similarity index 52% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntityWithTags.cs index a3237f18d8e0..14992678757a 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntityWithTags.cs @@ -10,8 +10,8 @@ namespace Azure.AI.Language.Text { - /// Contains the custom healthcare entity. - public partial class CustomHealthcareEntity + /// Entity object with tags. + public partial class PiiEntityWithTags { /// /// Keeps track of any properties unknown to the library. @@ -45,43 +45,40 @@ public partial class CustomHealthcareEntity /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Entity text as appears in the request. - /// Healthcare Entity Category. + /// Entity type. /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// is null. - internal CustomHealthcareEntity(string text, HealthcareEntityCategory category, int offset, int length, double confidenceScore) + /// or is null. + internal PiiEntityWithTags(string text, string category, int offset, int length, double confidenceScore) { Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(category, nameof(category)); Text = text; Category = category; Offset = offset; Length = length; ConfidenceScore = confidenceScore; - Links = new ChangeTrackingList(); - EntityComponentInformation = new ChangeTrackingList(); + Tags = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Entity text as appears in the request. - /// Healthcare Entity Category. + /// Entity type. /// (Optional) Entity sub type. /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// Assertion of the entity. - /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - /// Entity references in known data sources. - /// - /// (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. - /// 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 . - /// + /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. + /// List of entity tags. Tags are to express some similarities/affinity between entities. + /// Optional field which will be returned only when using the redaction policy kind “MaskWithEntityType”. This field will contain the exact mask text used to mask the PII entity in the original text. + /// Start position of masked text in the redacted text when using the redaction policy kind “MaskWithEntityType”. + /// The length of the masked text. Will be present when using the redaction policy kind “MaskWithEntityType”. /// Keeps track of any properties unknown to the library. - internal CustomHealthcareEntity(string text, HealthcareEntityCategory category, string subcategory, int offset, int length, double confidenceScore, HealthcareAssertion assertion, string name, IReadOnlyList links, IReadOnlyList entityComponentInformation, IDictionary serializedAdditionalRawData) + internal PiiEntityWithTags(string text, string category, string subcategory, int offset, int length, double confidenceScore, string type, IReadOnlyList tags, string mask, int? maskOffset, int? maskLength, IDictionary serializedAdditionalRawData) { Text = text; Category = category; @@ -89,22 +86,23 @@ internal CustomHealthcareEntity(string text, HealthcareEntityCategory category, Offset = offset; Length = length; ConfidenceScore = confidenceScore; - Assertion = assertion; - Name = name; - Links = links; - EntityComponentInformation = entityComponentInformation; + Type = type; + Tags = tags; + Mask = mask; + MaskOffset = maskOffset; + MaskLength = maskLength; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomHealthcareEntity() + /// Initializes a new instance of for deserialization. + internal PiiEntityWithTags() { } /// Entity text as appears in the request. public string Text { get; } - /// Healthcare Entity Category. - public HealthcareEntityCategory Category { get; } + /// Entity type. + public string Category { get; } /// (Optional) Entity sub type. public string Subcategory { get; } /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. @@ -113,17 +111,15 @@ internal CustomHealthcareEntity() public int Length { get; } /// Confidence score between 0 and 1 of the extracted entity. public double ConfidenceScore { get; } - /// Assertion of the entity. - public HealthcareAssertion Assertion { get; } - /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - public string Name { get; } - /// Entity references in known data sources. - public IReadOnlyList Links { get; } - /// - /// (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. - /// 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 EntityComponentInformation { get; } + /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. + public string Type { get; } + /// List of entity tags. Tags are to express some similarities/affinity between entities. + public IReadOnlyList Tags { get; } + /// Optional field which will be returned only when using the redaction policy kind “MaskWithEntityType”. This field will contain the exact mask text used to mask the PII entity in the original text. + public string Mask { get; } + /// Start position of masked text in the redacted text when using the redaction policy kind “MaskWithEntityType”. + public int? MaskOffset { get; } + /// The length of the masked text. Will be present when using the redaction policy kind “MaskWithEntityType”. + public int? MaskLength { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.cs deleted file mode 100644 index 0e8e9abf1f38..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// This object contains information of the prebuilt component of the detected entity. - public partial class PrebuiltComponent : EntityComponentInformation - { - /// Initializes a new instance of . - internal PrebuiltComponent() - { - EntityComponentKind = EntityComponentKind.PrebuiltComponent; - } - - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - /// The prebuilt component of an extracted entity type. - internal PrebuiltComponent(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData, string value) : base(entityComponentKind, serializedAdditionalRawData) - { - Value = value; - } - - /// The prebuilt component of an extracted entity type. - public string Value { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/RedactionPolicyKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/RedactionPolicyKind.cs new file mode 100644 index 000000000000..6fc733cd2a20 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/RedactionPolicyKind.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.AI.Language.Text +{ + /// Kinds of redaction policies supported. + internal readonly partial struct RedactionPolicyKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedactionPolicyKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoMaskValue = "noMask"; + private const string CharacterMaskValue = "characterMask"; + private const string EntityMaskValue = "entityMask"; + + /// Do not redact detected entities. + public static RedactionPolicyKind NoMask { get; } = new RedactionPolicyKind(NoMaskValue); + /// React detected entities with redaction character. + public static RedactionPolicyKind CharacterMask { get; } = new RedactionPolicyKind(CharacterMaskValue); + /// Redact detected entities with entity type. + public static RedactionPolicyKind EntityMask { get; } = new RedactionPolicyKind(EntityMaskValue); + /// Determines if two values are the same. + public static bool operator ==(RedactionPolicyKind left, RedactionPolicyKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedactionPolicyKind left, RedactionPolicyKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedactionPolicyKind(string value) => new RedactionPolicyKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedactionPolicyKind other && Equals(other); + /// + public bool Equals(RedactionPolicyKind 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/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs index 7e60f50f2d88..48a9185e44af 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs @@ -34,6 +34,7 @@ public ScriptCode(string value) private const string GujrValue = "Gujr"; private const string GuruValue = "Guru"; private const string HangValue = "Hang"; + private const string HaniValue = "Hani"; private const string HansValue = "Hans"; private const string HantValue = "Hant"; private const string HebrValue = "Hebr"; @@ -43,9 +44,13 @@ public ScriptCode(string value) private const string LaooValue = "Laoo"; private const string LatnValue = "Latn"; private const string MlymValue = "Mlym"; + private const string MongValue = "Mong"; + private const string MteiValue = "Mtei"; private const string MymrValue = "Mymr"; + private const string OlckValue = "Olck"; private const string OryaValue = "Orya"; private const string SinhValue = "Sinh"; + private const string ShrdValue = "Shrd"; private const string TamlValue = "Taml"; private const string TeluValue = "Telu"; private const string ThaaValue = "Thaa"; @@ -76,6 +81,8 @@ public ScriptCode(string value) public static ScriptCode Guru { get; } = new ScriptCode(GuruValue); /// Script code for the Hangul script. public static ScriptCode Hang { get; } = new ScriptCode(HangValue); + /// Script code for the HanLiteral script. + public static ScriptCode Hani { get; } = new ScriptCode(HaniValue); /// Script code for the HanSimplified script. public static ScriptCode Hans { get; } = new ScriptCode(HansValue); /// Script code for the HanTraditional script. @@ -94,12 +101,20 @@ public ScriptCode(string value) public static ScriptCode Latn { get; } = new ScriptCode(LatnValue); /// Script code for the Malayalam script. public static ScriptCode Mlym { get; } = new ScriptCode(MlymValue); + /// Script code for the Mongolian script. + public static ScriptCode Mong { get; } = new ScriptCode(MongValue); + /// Script code for the Meitei script. + public static ScriptCode Mtei { get; } = new ScriptCode(MteiValue); /// Script code for the Myanmar script. public static ScriptCode Mymr { get; } = new ScriptCode(MymrValue); + /// Script code for the Santali script. + public static ScriptCode Olck { get; } = new ScriptCode(OlckValue); /// Script code for the Odia script. public static ScriptCode Orya { get; } = new ScriptCode(OryaValue); /// Script code for the Sinhala script. public static ScriptCode Sinh { get; } = new ScriptCode(SinhValue); + /// Script code for the Sharada script. + public static ScriptCode Shrd { get; } = new ScriptCode(ShrdValue); /// Script code for the Tamil script. public static ScriptCode Taml { get; } = new ScriptCode(TamlValue); /// Script code for the Telugu script. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs index 75e88027f757..fb4476a9af65 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs @@ -34,6 +34,7 @@ public ScriptKind(string value) private const string GujaratiValue = "Gujarati"; private const string GurmukhiValue = "Gurmukhi"; private const string HangulValue = "Hangul"; + private const string HanLiteralValue = "HanLiteral"; private const string HanSimplifiedValue = "HanSimplified"; private const string HanTraditionalValue = "HanTraditional"; private const string HebrewValue = "Hebrew"; @@ -43,8 +44,12 @@ public ScriptKind(string value) private const string LaoValue = "Lao"; private const string LatinValue = "Latin"; private const string MalayalamValue = "Malayalam"; + private const string MeiteiValue = "Meitei"; + private const string MongolianValue = "Mongolian"; private const string MyanmarValue = "Myanmar"; private const string OdiaValue = "Odia"; + private const string SantaliValue = "Santali"; + private const string SharadaValue = "Sharada"; private const string SinhalaValue = "Sinhala"; private const string TamilValue = "Tamil"; private const string TeluguValue = "Telugu"; @@ -76,6 +81,8 @@ public ScriptKind(string value) public static ScriptKind Gurmukhi { get; } = new ScriptKind(GurmukhiValue); /// Script name for the Hangul script. public static ScriptKind Hangul { get; } = new ScriptKind(HangulValue); + /// Script name for the HanLiteral script. + public static ScriptKind HanLiteral { get; } = new ScriptKind(HanLiteralValue); /// Script name for the HanSimplified script. public static ScriptKind HanSimplified { get; } = new ScriptKind(HanSimplifiedValue); /// Script name for the HanTraditional script. @@ -94,10 +101,18 @@ public ScriptKind(string value) public static ScriptKind Latin { get; } = new ScriptKind(LatinValue); /// Script name for the Malayalam script. public static ScriptKind Malayalam { get; } = new ScriptKind(MalayalamValue); + /// Script name for the Meitei script. + public static ScriptKind Meitei { get; } = new ScriptKind(MeiteiValue); + /// Script name for the Mongolian script. + public static ScriptKind Mongolian { get; } = new ScriptKind(MongolianValue); /// Script name for the Myanmar script. public static ScriptKind Myanmar { get; } = new ScriptKind(MyanmarValue); /// Script name for the Odia script. public static ScriptKind Odia { get; } = new ScriptKind(OdiaValue); + /// Script name for the Santali script. + public static ScriptKind Santali { get; } = new ScriptKind(SantaliValue); + /// Script name for the Sharada script. + public static ScriptKind Sharada { get; } = new ScriptKind(SharadaValue); /// Script name for the Sinhala script. public static ScriptKind Sinhala { get; } = new ScriptKind(SinhalaValue); /// Script name for the Tamil script. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs index ddd7ff50c503..54e44707209c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs @@ -67,7 +67,7 @@ internal TextActions(int completed, int failed, int inProgress, int total) /// /// Enumerable of Analyze text job results. /// 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 . /// /// Keeps track of any properties unknown to the library. internal TextActions(int completed, int failed, int inProgress, int total, IReadOnlyList items, IDictionary serializedAdditionalRawData) @@ -96,7 +96,7 @@ internal TextActions() /// /// Enumerable of Analyze text job results. /// 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 IReadOnlyList Items { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs index 50a2b4d7e0b7..aea5acc66092 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs @@ -16,7 +16,7 @@ namespace Azure.AI.Language.Text { // Data plane generated client. - /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://docs.microsoft.com/azure/cognitive-services/language-service/overview\">https://docs.microsoft.com/azure/cognitive-services/language-service/overview</a>.0. + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://learn.microsoft.com/azure/cognitive-services/language-service/overview\">https://learn.microsoft.com/azure/cognitive-services/language-service/overview</a>.0. public partial class TextAnalysisClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs index b6d48331233c..501497ceaa75 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// Client options for TextAnalysisClient. public partial class TextAnalysisClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2023_11_15_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; /// The version of the service to use. public enum ServiceVersion @@ -22,8 +22,10 @@ public enum ServiceVersion V2022_05_01 = 1, /// Service version "2023-04-01". V2023_04_01 = 2, - /// Service version "2023-11-15-preview". - V2023_11_15_Preview = 3, + /// Service version "2024-11-01". + V2024_11_01 = 3, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 4, } internal string Version { get; } @@ -35,7 +37,8 @@ public TextAnalysisClientOptions(ServiceVersion version = LatestVersion) { ServiceVersion.V2022_05_01 => "2022-05-01", ServiceVersion.V2023_04_01 => "2023-04-01", - ServiceVersion.V2023_11_15_Preview => "2023-11-15-preview", + ServiceVersion.V2024_11_01 => "2024-11-01", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs index 56c98363bd41..b412da679e01 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs @@ -34,26 +34,26 @@ public static LanguageInput LanguageInput(string id = null, string text = null, return new LanguageInput(id, text, countryHint, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Results for Dynamic Classification task. - /// A new instance for mocking. - public static AnalyzeTextDynamicClassificationResult AnalyzeTextDynamicClassificationResult(DynamicClassificationResult results = null) + /// Initializes a new instance of . + /// Entity linking result. + /// A new instance for mocking. + public static AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(EntityLinkingResult results = null) { - return new AnalyzeTextDynamicClassificationResult(AnalyzeTextResultsKind.DynamicClassificationResults, serializedAdditionalRawData: null, results); + return new AnalyzeTextEntityLinkingResult(AnalyzeTextResultsKind.EntityLinkingResults, serializedAdditionalRawData: null, results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - /// A new instance for mocking. - public static DynamicClassificationResult DynamicClassificationResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + /// A new instance for mocking. + public static EntityLinkingResult EntityLinkingResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) { errors ??= new List(); - documents ??= new List(); + documents ??= new List(); - return new DynamicClassificationResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + return new EntityLinkingResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -116,18 +116,25 @@ public static RequestStatistics RequestStatistics(int documentsCount = default, return new RequestStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transactionsCount, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Array of classification results. - /// A new instance for mocking. - public static DynamicClassificationDocumentResult DynamicClassificationDocumentResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable classifications = null) + /// Recognized well known entities in the document. + /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. + /// A new instance for mocking. + public static EntityLinkingActionResult EntityLinkingActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) { warnings ??= new List(); - classifications ??= new List(); + entities ??= new List(); - return new DynamicClassificationDocumentResult(id, warnings?.ToList(), statistics, classifications?.ToList(), serializedAdditionalRawData: null); + return new EntityLinkingActionResult( + id, + warnings?.ToList(), + statistics, + entities?.ToList(), + detectedLanguage, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -149,58 +156,6 @@ public static DocumentStatistics DocumentStatistics(int charactersCount = defaul return new DocumentStatistics(charactersCount, transactionsCount, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Classification type. - /// Confidence score between 0 and 1 of the recognized class. - /// A new instance for mocking. - public static ClassificationResult ClassificationResult(string category = null, double confidenceScore = default) - { - return new ClassificationResult(category, confidenceScore, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Entity linking result. - /// A new instance for mocking. - public static AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(EntityLinkingResult results = null) - { - return new AnalyzeTextEntityLinkingResult(AnalyzeTextResultsKind.EntityLinkingResults, serializedAdditionalRawData: null, results); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates which model is used for scoring. - /// Response by document. - /// A new instance for mocking. - public static EntityLinkingResult EntityLinkingResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) - { - errors ??= new List(); - documents ??= new List(); - - return new EntityLinkingResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Recognized well known entities in the document. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static EntityLinkingActionResult EntityLinkingActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) - { - warnings ??= new List(); - entities ??= new List(); - - return new EntityLinkingActionResult( - id, - warnings?.ToList(), - statistics, - entities?.ToList(), - detectedLanguage, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Entity Linking formal name. /// List of instances this entity appears in the text. @@ -240,40 +195,40 @@ public static EntityLinkingMatch EntityLinkingMatch(double confidenceScore = def /// Long name of a detected language (e.g. English, French). /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - /// Identifies the script of the input document. - /// Identifies the script of the input document. + /// Identifies the script name of the input document according to the ISO 15924 standard. + /// Identifies the script code of the input document according to the ISO 15924 standard. /// A new instance for mocking. - public static DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = default, ScriptKind? script = null, ScriptCode? scriptCode = null) + public static DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = default, ScriptKind? scriptName = null, ScriptCode? scriptIso15924Code = null) { return new DetectedLanguage( name, iso6391Name, confidenceScore, - script, - scriptCode, + scriptName, + scriptIso15924Code, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// Results for entity recognition. /// A new instance for mocking. - public static AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(EntitiesResult results = null) + public static AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(EntitiesWithMetadataAutoResult results = null) { return new AnalyzeTextEntitiesResult(AnalyzeTextResultsKind.EntityRecognitionResults, serializedAdditionalRawData: null, results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - /// A new instance for mocking. - public static EntitiesResult EntitiesResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + /// A new instance for mocking. + public static EntitiesWithMetadataAutoResult EntitiesWithMetadataAutoResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) { errors ??= new List(); documents ??= new List(); - return new EntitiesResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + return new EntitiesWithMetadataAutoResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -642,10 +597,10 @@ public static PiiResult PiiResult(IEnumerable errors = null, Requ /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// A new instance for mocking. - public static PiiActionResult PiiActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, string redactedText = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) + public static PiiActionResult PiiActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, string redactedText = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) { warnings ??= new List(); - entities ??= new List(); + entities ??= new List(); return new PiiActionResult( id, @@ -657,23 +612,35 @@ public static PiiActionResult PiiActionResult(string id = null, IEnumerable Initializes a new instance of . + /// Initializes a new instance of . /// Entity text as appears in the request. /// Entity type. /// (Optional) Entity sub type. /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// A new instance for mocking. - public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default) + /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. + /// List of entity tags. Tags are to express some similarities/affinity between entities. + /// Optional field which will be returned only when using the redaction policy kind “MaskWithEntityType”. This field will contain the exact mask text used to mask the PII entity in the original text. + /// Start position of masked text in the redacted text when using the redaction policy kind “MaskWithEntityType”. + /// The length of the masked text. Will be present when using the redaction policy kind “MaskWithEntityType”. + /// A new instance for mocking. + public static PiiEntityWithTags PiiEntityWithTags(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default, string type = null, IEnumerable tags = null, string mask = null, int? maskOffset = null, int? maskLength = null) { - return new NamedEntity( + tags ??= new List(); + + return new PiiEntityWithTags( text, category, subcategory, offset, length, confidenceScore, + type, + tags?.ToList(), + mask, + maskOffset, + maskLength, serializedAdditionalRawData: null); } @@ -857,7 +824,7 @@ public static AnalyzeTextOperationState AnalyzeTextOperationState(string display /// /// Enumerable of Analyze text job results. /// 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 . /// /// A new instance for mocking. public static TextActions TextActions(int completed = default, int failed = default, int inProgress = default, int total = default, IEnumerable items = null) @@ -890,7 +857,7 @@ public static AnalyzeTextOperationResult AnalyzeTextOperationResult(DateTimeOffs /// task name. /// List of results. /// A new instance for mocking. - public static CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomEntitiesActionResult results = null) + public static CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomEntitiesResult results = null) { return new CustomEntityRecognitionOperationResult( lastUpdateDateTime, @@ -901,19 +868,19 @@ public static CustomEntityRecognitionOperationResult CustomEntityRecognitionOper results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Enumeration of the document results with detected language. - /// A new instance for mocking. - public static CustomEntitiesActionResult CustomEntitiesActionResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) + /// Enumeration of the document results. + /// A new instance for mocking. + public static CustomEntitiesResult CustomEntitiesResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) { errors ??= new List(); documents ??= new List(); - return new CustomEntitiesActionResult( + return new CustomEntitiesResult( errors?.ToList(), statistics, projectName, @@ -943,13 +910,33 @@ public static EntityActionResult EntityActionResult(string id = null, IEnumerabl serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Entity text as appears in the request. + /// Entity type. + /// (Optional) Entity sub type. + /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. + /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. + /// Confidence score between 0 and 1 of the extracted entity. + /// A new instance for mocking. + public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default) + { + return new NamedEntity( + text, + category, + subcategory, + offset, + length, + confidenceScore, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. /// task name. /// List of results. /// A new instance for mocking. - public static CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationActionResult results = null) + public static CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationResult results = null) { return new CustomSingleLabelClassificationOperationResult( lastUpdateDateTime, @@ -960,19 +947,19 @@ public static CustomSingleLabelClassificationOperationResult CustomSingleLabelCl results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. - /// A new instance for mocking. - public static CustomLabelClassificationActionResult CustomLabelClassificationActionResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) + /// A new instance for mocking. + public static CustomLabelClassificationResult CustomLabelClassificationResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) { errors ??= new List(); documents ??= new List(); - return new CustomLabelClassificationActionResult( + return new CustomLabelClassificationResult( errors?.ToList(), statistics, projectName, @@ -1002,13 +989,22 @@ public static ClassificationActionResult ClassificationActionResult(string id = serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Classification type. + /// Confidence score between 0 and 1 of the recognized class. + /// A new instance for mocking. + public static ClassificationResult ClassificationResult(string category = null, double confidenceScore = default) + { + return new ClassificationResult(category, confidenceScore, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. /// task name. /// List of results. /// A new instance for mocking. - public static CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationActionResult results = null) + public static CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationResult results = null) { return new CustomMultiLabelClassificationOperationResult( lastUpdateDateTime, @@ -1053,6 +1049,34 @@ public static EntityRecognitionOperationResult EntityRecognitionOperationResult( results); } + /// Initializes a new instance of . + /// Errors by document id. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// This field indicates which model is used for scoring. + /// Response by document. + /// A new instance for mocking. + public static EntitiesResult EntitiesResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + { + errors ??= new List(); + documents ??= new List(); + + return new EntitiesResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique, non-empty document identifier. + /// Warnings encountered while processing document. + /// if showStats=true was specified in the request this field will contain information about the document payload. + /// Recognized entities in the document. + /// A new instance for mocking. + public static EntitiesDocumentResultWithMetadata EntitiesDocumentResultWithMetadata(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null) + { + warnings ??= new List(); + entities ??= new List(); + + return new EntitiesDocumentResultWithMetadata(id, warnings?.ToList(), statistics, entities?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. @@ -1240,87 +1264,6 @@ public static SentimentOperationResult SentimentOperationResult(DateTimeOffset l results); } - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Results of the task. - /// A new instance for mocking. - public static CustomSentimentAnalysisOperationResult CustomSentimentAnalysisOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomSentimentAnalysisResult results = null) - { - return new CustomSentimentAnalysisOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeTextOperationResultsKind.CustomSentimentAnalysisOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// The custom sentiment analysis results for each document in the input. - /// A new instance for mocking. - public static CustomSentimentAnalysisResult CustomSentimentAnalysisResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) - { - errors ??= new List(); - documents ??= new List(); - - return new CustomSentimentAnalysisResult( - errors?.ToList(), - statistics, - projectName, - deploymentName, - documents?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The document's sentences sentiment. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static CustomSentimentAnalysisResultDocument CustomSentimentAnalysisResultDocument(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, DocumentSentiment sentiment = default, SentimentConfidenceScores confidenceScores = null, IEnumerable sentences = null, DetectedLanguage detectedLanguage = null) - { - warnings ??= new List(); - sentences ??= new List(); - - return new CustomSentimentAnalysisResultDocument( - id, - warnings?.ToList(), - statistics, - sentiment, - confidenceScores, - sentences?.ToList(), - detectedLanguage, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The sentence text. - /// The predicted Sentiment for the sentence. - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The target offset from the start of the sentence. - /// The length of the target. - /// A new instance for mocking. - public static CustomSentenceSentiment CustomSentenceSentiment(string text = null, SentenceSentimentValue sentiment = default, SentimentConfidenceScores confidenceScores = null, int offset = default, int length = default) - { - return new CustomSentenceSentiment( - text, - sentiment, - confidenceScores, - offset, - length, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. @@ -1456,165 +1399,6 @@ public static SummaryContext SummaryContext(int offset = default, int length = d return new SummaryContext(offset, length, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Results of the task. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationOperationResult CustomAbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomAbstractiveSummarizationResult results = null) - { - return new CustomAbstractiveSummarizationOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeTextOperationResultsKind.CustomAbstractiveSummarizationOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// Response by document. - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationResult CustomAbstractiveSummarizationResult(IEnumerable documents = null, IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null) - { - documents ??= new List(); - errors ??= new List(); - - return new CustomAbstractiveSummarizationResult( - documents?.ToList(), - errors?.ToList(), - statistics, - projectName, - deploymentName, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Contains the list of document results. - /// A new instance for mocking. - public static CustomHealthcareOperationResult CustomHealthcareOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomHealthcareResult results = null) - { - return new CustomHealthcareOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeTextOperationResultsKind.CustomHealthcareOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// List of custom healthcare results for the document. - /// A new instance for mocking. - public static CustomHealthcareResult CustomHealthcareResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) - { - errors ??= new List(); - documents ??= new List(); - - return new CustomHealthcareResult( - errors?.ToList(), - statistics, - projectName, - deploymentName, - documents?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Healthcare entities. - /// Healthcare entity relations. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static CustomHealthcareActionResult CustomHealthcareActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, IEnumerable relations = null, DetectedLanguage detectedLanguage = null) - { - warnings ??= new List(); - entities ??= new List(); - relations ??= new List(); - - return new CustomHealthcareActionResult( - id, - warnings?.ToList(), - statistics, - entities?.ToList(), - relations?.ToList(), - detectedLanguage, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Entity text as appears in the request. - /// Healthcare Entity Category. - /// (Optional) Entity sub type. - /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - /// Confidence score between 0 and 1 of the extracted entity. - /// Assertion of the entity. - /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - /// Entity references in known data sources. - /// - /// (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A new instance for mocking. - public static CustomHealthcareEntity CustomHealthcareEntity(string text = null, HealthcareEntityCategory category = default, string subcategory = null, int offset = default, int length = default, double confidenceScore = default, HealthcareAssertion assertion = null, string name = null, IEnumerable links = null, IEnumerable entityComponentInformation = null) - { - links ??= new List(); - entityComponentInformation ??= new List(); - - return new CustomHealthcareEntity( - text, - category, - subcategory, - offset, - length, - confidenceScore, - assertion, - name, - links?.ToList(), - entityComponentInformation?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The prebuilt component of an extracted entity type. - /// A new instance for mocking. - public static PrebuiltComponent PrebuiltComponent(string value = null) - { - return new PrebuiltComponent(EntityComponentKind.PrebuiltComponent, serializedAdditionalRawData: null, value); - } - - /// Initializes a new instance of . - /// The learned component of an extracted entity type. - /// A new instance for mocking. - public static LearnedComponent LearnedComponent(string value = null) - { - return new LearnedComponent(EntityComponentKind.LearnedComponent, serializedAdditionalRawData: null, value); - } - - /// Initializes a new instance of . - /// The list key of an extracted entity type. - /// A new instance for mocking. - public static ListComponent ListComponent(string value = null) - { - return new ListComponent(EntityComponentKind.ListComponent, serializedAdditionalRawData: null, value); - } - /// Initializes a new instance of . /// logging opt out. /// This field indicates the project name for the model. @@ -1645,56 +1429,5 @@ public static CustomMultiLabelClassificationActionContent CustomMultiLabelClassi { return new CustomMultiLabelClassificationActionContent(loggingOptOut, projectName, deploymentName, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Specifies the method used to interpret string offsets. - /// A new instance for mocking. - public static CustomSentimentAnalysisActionContent CustomSentimentAnalysisActionContent(bool? loggingOptOut = null, string projectName = null, string deploymentName = null, StringIndexType? stringIndexType = null) - { - return new CustomSentimentAnalysisActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// task name. - /// Parameters for the Custom Abstractive Summarization task. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationOperationAction CustomAbstractiveSummarizationOperationAction(string name = null, CustomAbstractiveSummarizationActionContent actionContent = null) - { - return new CustomAbstractiveSummarizationOperationAction(name, AnalyzeTextOperationActionKind.CustomAbstractiveSummarization, serializedAdditionalRawData: null, actionContent); - } - - /// Initializes a new instance of . - /// Controls the approximate number of sentences in the output summaries. - /// String index type. - /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationActionContent CustomAbstractiveSummarizationActionContent(int? sentenceCount = null, StringIndexType? stringIndexType = null, SummaryLengthBucket? summaryLength = null, bool? loggingOptOut = null, string projectName = null, string deploymentName = null) - { - return new CustomAbstractiveSummarizationActionContent( - sentenceCount, - stringIndexType, - summaryLength, - loggingOptOut, - projectName, - deploymentName, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). - /// A new instance for mocking. - public static CustomHealthcareActionContent CustomHealthcareActionContent(bool? loggingOptOut = null, string projectName = null, string deploymentName = null, StringIndexType? stringIndexType = null) - { - return new CustomHealthcareActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData: null); - } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs deleted file mode 100644 index 6996da068b41..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class TextDynamicClassificationInput : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.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(TextDynamicClassificationInput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(TextInput)) - { - writer.WritePropertyName("analysisInput"u8); - writer.WriteObjectValue(TextInput, options); - } - if (Optional.IsDefined(ActionContent)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); - } - } - - TextDynamicClassificationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTextDynamicClassificationInput(document.RootElement, options); - } - - internal static TextDynamicClassificationInput DeserializeTextDynamicClassificationInput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MultiLanguageTextInput analysisInput = default; - DynamicClassificationActionContent parameters = default; - AnalyzeTextInputKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("analysisInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - analysisInput = MultiLanguageTextInput.DeserializeMultiLanguageTextInput(property.Value, options); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = DynamicClassificationActionContent.DeserializeDynamicClassificationActionContent(property.Value, options); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextInputKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new TextDynamicClassificationInput(kind, serializedAdditionalRawData, analysisInput, parameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support writing '{options.Format}' format."); - } - } - - TextDynamicClassificationInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeTextDynamicClassificationInput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} 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 new TextDynamicClassificationInput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTextDynamicClassificationInput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.cs deleted file mode 100644 index ebe95188402a..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Contains the analyze text dynamic classifications input. - public partial class TextDynamicClassificationInput : AnalyzeTextInput - { - /// Initializes a new instance of . - public TextDynamicClassificationInput() - { - Kind = AnalyzeTextInputKind.DynamicClassification; - } - - /// Initializes a new instance of . - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Input to be analyzed. - /// Task parameters. - internal TextDynamicClassificationInput(AnalyzeTextInputKind kind, IDictionary serializedAdditionalRawData, MultiLanguageTextInput textInput, DynamicClassificationActionContent actionContent) : base(kind, serializedAdditionalRawData) - { - TextInput = textInput; - ActionContent = actionContent; - } - - /// Input to be analyzed. - public MultiLanguageTextInput TextInput { get; set; } - /// Task parameters. - public DynamicClassificationActionContent ActionContent { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..7c1bd0e58598 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text +{ + internal partial class UnknownBaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.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(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static UnknownBaseRedactionPolicy DeserializeUnknownBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBaseRedactionPolicy(policyKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 new UnknownBaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownBaseRedactionPolicy(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.cs new file mode 100644 index 000000000000..4abd33011f14 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Unknown version of BaseRedactionPolicy. + internal partial class UnknownBaseRedactionPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal UnknownBaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownBaseRedactionPolicy() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.cs deleted file mode 100644 index 626786867c52..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Unknown version of EntityComponentInformation. - internal partial class UnknownEntityComponentInformation : EntityComponentInformation - { - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - internal UnknownEntityComponentInformation(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData) : base(entityComponentKind, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownEntityComponentInformation() - { - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs index 710acbfa64e1..a4e549e2c636 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs @@ -16,160 +16,6 @@ namespace Azure.AI.Language.Text.Samples { public partial class Samples_TextAnalysisClient { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - kind = "DynamicClassification", - parameters = new - { - categories = new object[] - { -"Health", -"Politics", -"Music", -"Sports" - }, - classificationType = "Multi", - modelVersion = "latest", - }, - analysisInput = new - { - documents = new object[] - { -new -{ -id = "1", -language = "en", -text = "The WHO is issuing a warning about Monkey Pox.", -}, -new -{ -id = "2", -language = "en", -text = "Mo Salah plays in Liverpool FC in England.", -} - }, - }, - }); - Response response = client.AnalyzeText(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - kind = "DynamicClassification", - parameters = new - { - categories = new object[] - { -"Health", -"Politics", -"Music", -"Sports" - }, - classificationType = "Multi", - modelVersion = "latest", - }, - analysisInput = new - { - documents = new object[] - { -new -{ -id = "1", -language = "en", -text = "The WHO is issuing a warning about Monkey Pox.", -}, -new -{ -id = "2", -language = "en", -text = "Mo Salah plays in Liverpool FC in England.", -} - }, - }, - }); - Response response = await client.AnalyzeTextAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput - { - TextInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") -{ -Language = "en", -}, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") -{ -Language = "en", -}}, - }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) - { - ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, - }, - }; - Response response = client.AnalyzeText(analyzeTextInput); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput - { - TextInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") -{ -Language = "en", -}, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") -{ -Language = "en", -}}, - }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) - { - ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, - }, - }; - Response response = await client.AnalyzeTextAsync(analyzeTextInput); - } - [Test] [Ignore("Only validating compilation of examples")] public void Example_Text_AnalyzeText_SuccessfulEntityLinkingRequest() @@ -1512,7 +1358,135 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionExclusi [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest() + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionPolicy = new + { + policyKind = "entityMask", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My name is John Doe My phone number is 424 878 9192", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionPolicy = new + { + policyKind = "entityMask", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My name is John Doe My phone number is 424 878 9192", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionPolicy = new EntityMaskPolicyType(), + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionPolicy = new EntityMaskPolicyType(), + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1524,7 +1498,11 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1559,7 +1537,7 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Async() + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1571,7 +1549,11 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedacti parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1606,7 +1588,7 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedacti [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Convenience() + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1630,7 +1612,10 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = client.AnalyzeText(analyzeTextInput); @@ -1638,7 +1623,7 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Convenience_Async() + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1662,7 +1647,10 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedacti ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); @@ -1942,7 +1930,7 @@ public async Task Example_Text_AnalyzeText_SuccessfulSentimentAnalysisRequest_Co [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1963,7 +1951,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbs [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1984,7 +1972,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1995,7 +1983,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbs [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2006,7 +1994,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2027,7 +2015,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAna [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2048,7 +2036,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2059,7 +2047,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAna [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2070,7 +2058,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2091,7 +2079,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCus [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2112,7 +2100,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult_Convenience() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2123,7 +2111,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCus [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult_Convenience_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2132,134 +2120,6 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); } - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); - } - [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulHealthcareDocumentTypeTaskStatusRequest() @@ -2390,7 +2250,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2419,7 +2279,8 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari taskName = "Document Abstractive Summarization Task 1", parameters = new { -sentenceCount = 1, +summaryLength = "medium", +instruction = "XYZ-code", }, } }, @@ -2429,7 +2290,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2458,7 +2319,8 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS taskName = "Document Abstractive Summarization Task 1", parameters = new { -sentenceCount = 1, +summaryLength = "medium", +instruction = "XYZ-code", }, } }, @@ -2468,7 +2330,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2487,7 +2349,8 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari { ActionContent = new AbstractiveSummarizationActionContent { -SentenceCount = 1, +SummaryLength = SummaryLengthBucket.Medium, +Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2496,7 +2359,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2515,7 +2378,8 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS { ActionContent = new AbstractiveSummarizationActionContent { -SentenceCount = 1, +SummaryLength = SummaryLengthBucket.Medium, +Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2524,7 +2388,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2532,7 +2396,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2541,13 +2405,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul { id = "1", language = "en", -text = "I had a wonderful trip to Seattle last week.", -}, -new -{ -id = "2", -language = "en", -text = "I'm flying to NYC tomorrow. See you there.", +text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2555,21 +2413,11 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul { new { -kind = "EntityRecognition", -taskName = "Recognize Entities", -parameters = new -{ -modelVersion = "latest", -}, -}, -new -{ -kind = "CustomEntityRecognition", -taskName = "Recognize US Regions", +kind = "AbstractiveSummarization", +taskName = "Document Abstractive Summarization Task 1", parameters = new { -projectName = "MyProject", -deploymentName = "MyDeployment", +sentenceCount = 1, }, } }, @@ -2579,7 +2427,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2587,7 +2435,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2596,13 +2444,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ { id = "1", language = "en", -text = "I had a wonderful trip to Seattle last week.", -}, -new -{ -id = "2", -language = "en", -text = "I'm flying to NYC tomorrow. See you there.", +text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2610,21 +2452,11 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ { new { -kind = "EntityRecognition", -taskName = "Recognize Entities", -parameters = new -{ -modelVersion = "latest", -}, -}, -new -{ -kind = "CustomEntityRecognition", -taskName = "Recognize US Regions", +kind = "AbstractiveSummarization", +taskName = "Document Abstractive Summarization Task 1", parameters = new { -projectName = "MyProject", -deploymentName = "MyDeployment", +sentenceCount = 1, }, } }, @@ -2634,7 +2466,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2642,35 +2474,27 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") -{ -Language = "en", -}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new EntitiesOperationAction +new AbstractiveSummarizationOperationAction { -ActionContent = new EntitiesActionContent +ActionContent = new AbstractiveSummarizationActionContent { -ModelVersion = "latest", -}, -Name = "Recognize Entities", +SentenceCount = 1, }, -new CustomEntitiesOperationAction -{ -ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), -Name = "Recognize US Regions", +Name = "Document Abstractive Summarization Task 1", } }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2678,35 +2502,27 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") -{ -Language = "en", -}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new EntitiesOperationAction +new AbstractiveSummarizationOperationAction { -ActionContent = new EntitiesActionContent +ActionContent = new AbstractiveSummarizationActionContent { -ModelVersion = "latest", -}, -Name = "Recognize Entities", +SentenceCount = 1, }, -new CustomEntitiesOperationAction -{ -ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), -Name = "Recognize US Regions", +Name = "Document Abstractive Summarization Task 1", } }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2714,7 +2530,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveS using RequestContent content = RequestContent.Create(new { - displayName = "Document Custom Abstractive Summarization Task Example", + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] @@ -2723,47 +2539,13 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveS { id = "1", language = "en", -text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", -} - }, - }, - tasks = new object[] - { -new -{ -kind = "CustomAbstractiveSummarization", -taskName = "Custom Document Abstractive Summarization Task 1", -parameters = new -{ -projectName = "my_project", -deploymentName = "my_deployment", +text = "I had a wonderful trip to Seattle last week.", }, -} - }, - }); - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - displayName = "Document Custom Abstractive Summarization Task Example", - analysisInput = new - { - documents = new object[] - { new { -id = "1", +id = "2", language = "en", -text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", +text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2771,98 +2553,21 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstra { new { -kind = "CustomAbstractiveSummarization", -taskName = "Custom Document Abstractive Summarization Task 1", +kind = "EntityRecognition", +taskName = "Recognize Entities", parameters = new { -projectName = "my_project", -deploymentName = "my_deployment", +modelVersion = "latest", +}, }, -} - }, - }); - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") -{ -Language = "en", -}}, - }; - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) -{ -Name = "Custom Document Abstractive Summarization Task 1", -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") -{ -Language = "en", -}}, - }; - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) -{ -Name = "Custom Document Abstractive Summarization Task 1", -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - analysisInput = new - { - documents = new object[] - { -new -{ -text = "Prescribed 100mg ibuprofen, taken twice daily.", -id = "1", -language = "en", -} - }, - }, - tasks = new object[] - { new { -kind = "CustomHealthcare", +kind = "CustomEntityRecognition", +taskName = "Recognize US Regions", parameters = new { -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +projectName = "MyProject", +deploymentName = "MyDeployment", }, } }, @@ -2872,7 +2577,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePo [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2880,101 +2585,22 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealth using RequestContent content = RequestContent.Create(new { + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] { new { -text = "Prescribed 100mg ibuprofen, taken twice daily.", id = "1", language = "en", -} - }, - }, - tasks = new object[] - { -new -{ -kind = "CustomHealthcare", -parameters = new -{ -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +text = "I had a wonderful trip to Seattle last week.", }, -} - }, - }); - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") -{ -Language = "en", -}}, - }; - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomHealthcareOperationAction -{ -ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") -{ -Language = "en", -}}, - }; - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomHealthcareOperationAction -{ -ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - analysisInput = new - { - documents = new object[] - { new { -text = "The food is great. But the service is bad.", -id = "1", +id = "2", language = "en", +text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2982,49 +2608,21 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAna { new { -kind = "CustomSentimentAnalysis", +kind = "EntityRecognition", +taskName = "Recognize Entities", parameters = new { -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +modelVersion = "latest", +}, }, -} - }, - }); - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - analysisInput = new - { - documents = new object[] - { -new -{ -text = "The food is great. But the service is bad.", -id = "1", -language = "en", -} - }, - }, - tasks = new object[] - { new { -kind = "CustomSentimentAnalysis", +kind = "CustomEntityRecognition", +taskName = "Recognize US Regions", parameters = new { -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +projectName = "MyProject", +deploymentName = "MyDeployment", }, } }, @@ -3034,7 +2632,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentim [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit_Convenience() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -3042,23 +2640,35 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAna MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") +{ +Language = "en", +}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new CustomSentimentAnalysisOperationAction +new EntitiesOperationAction { -ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), +ActionContent = new EntitiesActionContent +{ +ModelVersion = "latest", +}, +Name = "Recognize Entities", +}, +new CustomEntitiesOperationAction +{ +ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), +Name = "Recognize US Regions", } }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit_Convenience_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -3066,16 +2676,28 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentim MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") +{ +Language = "en", +}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new CustomSentimentAnalysisOperationAction +new EntitiesOperationAction +{ +ActionContent = new EntitiesActionContent { -ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), +ModelVersion = "latest", +}, +Name = "Recognize Entities", +}, +new CustomEntitiesOperationAction +{ +ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), +Name = "Recognize US Regions", } }); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml index 15f09d913224..0a0bc87dca1d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml @@ -1,4 +1,4 @@ -repo: Azure/azure-rest-api-specs -commit: 21c2852d62ccc3abe9cc3800c989c6826f8363dc directory: specification/cognitiveservices/Language.AnalyzeText - +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/cognitiveservices/ci.mgmt.yml b/sdk/cognitiveservices/ci.mgmt.yml index ddeb32b868ce..79dda70912e2 100644 --- a/sdk/cognitiveservices/ci.mgmt.yml +++ b/sdk/cognitiveservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cognitiveservices/ci.mgmt.yml - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cognitiveservices/ci.mgmt.yml + - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/communication/ci.mgmt.yml b/sdk/communication/ci.mgmt.yml index 8fc73e107745..be0c8b4b5903 100644 --- a/sdk/communication/ci.mgmt.yml +++ b/sdk/communication/ci.mgmt.yml @@ -1,5 +1,6 @@ trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/communication/ci.mgmt.yml - sdk/communication/Azure.ResourceManager.Communication/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/communication/ci.mgmt.yml + - sdk/communication/Azure.ResourceManager.Communication/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/compute/ci.mgmt.yml b/sdk/compute/ci.mgmt.yml index d9520f58d12c..9736fea82d63 100644 --- a/sdk/compute/ci.mgmt.yml +++ b/sdk/compute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/compute/ci.mgmt.yml - sdk/compute/Azure.ResourceManager.Compute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/compute/ci.mgmt.yml + - sdk/compute/Azure.ResourceManager.Compute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json new file mode 100644 index 000000000000..0a2e613ee801 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ComputeFleet", + "library-name": "Azure.ResourceManager.ComputeFleet", + "model-namespace": false, + "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/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml index 33e2a8ab89cd..4f8b05ab3603 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: 7e22a66617633d162735fe65388c2852127b4aac +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c repo: Azure/azure-rest-api-specs - +additionalDirectories: diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json new file mode 100644 index 000000000000..5865300e0746 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json @@ -0,0 +1,34879 @@ +{ + "$id": "1", + "Name": "Microsoft.AzureFleet", + "ApiVersions": [ + "2024-11-01" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "ComputeFleetProvisioningState", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProvisioningState", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Resource has been created.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Initial creation in progress.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Update in progress.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Deletion in progress.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Migrating", + "value": "Migrating", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Resource is being migrated from one subscription or resource group to another.", + "decorators": [] + } + ], + "description": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "18", + "kind": "enum", + "name": "ComputeFleetEvictionPolicy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EvictionPolicy", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "20", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "18" + }, + "description": "When evicted, the Spot VM will be deleted and the corresponding capacity will be updated to reflect this.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "18" + }, + "description": "When evicted, the Spot VM will be deallocated/stopped", + "decorators": [] + } + ], + "description": "Different kind of eviction policies", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "SpotAllocationStrategy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotAllocationStrategy", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "PriceCapacityOptimized", + "value": "PriceCapacityOptimized", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "description": "Default. VM sizes distribution will be determined to optimize for both price and capacity.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "LowestPrice", + "value": "LowestPrice", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "description": "VM sizes distribution will be determined to optimize for price. Note: Capacity will still be considered here but will be given much less weight.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "CapacityOptimized", + "value": "CapacityOptimized", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "description": "VM sizes distribution will be determined to optimize for capacity.", + "decorators": [] + } + ], + "description": "Spot allocation strategy types for Compute Fleet", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "RegularPriorityAllocationStrategy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityAllocationStrategy", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "LowestPrice", + "value": "LowestPrice", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "description": "Default. VM sizes distribution will be determined to optimize for price.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Prioritized", + "value": "Prioritized", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "description": "VM sizes distribution will be determined to optimize for the 'priority' as specified for each vm size.", + "decorators": [] + } + ], + "description": "Regular VM Allocation strategy types for Compute Fleet", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "ComputeFleetVMAttributeSupport", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeSupport", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Excluded", + "value": "Excluded", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "description": "All VMSizes having the feature support will be excluded.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Included", + "value": "Included", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "description": " VMSizes that have the feature support and that do not have the feature support will be used. Included is a union of Excluded and Required.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Required", + "value": "Required", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "description": "Only the VMSizes having the feature support will be used.", + "decorators": [] + } + ], + "description": "VMSizes supported by Azure VMs. Included is a union of Excluded and Required.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "46", + "kind": "enum", + "name": "LocalStorageDiskType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocalStorageDiskType", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "48", + "kind": "enumvalue", + "name": "HDD", + "value": "HDD", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "description": "HDD DiskType.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "SSD", + "value": "SSD", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "description": "SDD DiskType.", + "decorators": [] + } + ], + "description": "Different kind of Local storage disk types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "AcceleratorManufacturer", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AcceleratorManufacturer", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "AMD", + "value": "AMD", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "description": "AMD GpuType", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Nvidia", + "value": "Nvidia", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "description": "Nvidia GpuType", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Xilinx", + "value": "Xilinx", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "description": "Xilinx GpuType", + "decorators": [] + } + ], + "description": "Accelerator manufacturers supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "AcceleratorType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AcceleratorType", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "GPU", + "value": "GPU", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "description": "GPU Accelerator", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "FPGA", + "value": "FPGA", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "description": "FPGA Accelerator", + "decorators": [] + } + ], + "description": "Accelerator types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "ComputeFleetVmCategory", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMCategory", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "GeneralPurpose", + "value": "GeneralPurpose", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "ComputeOptimized", + "value": "ComputeOptimized", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium traffic web servers, network appliances, batch processes, and application servers.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "MemoryOptimized", + "value": "MemoryOptimized", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database servers, medium to large caches, and in-memory analytics.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "StorageOptimized", + "value": "StorageOptimized", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases. \nExamples include Cassandra, MongoDB, Cloudera, and Redis.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "GpuAccelerated", + "value": "GpuAccelerated", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "GPU optimized VM sizes are specialized virtual machines available with single, multiple, or fractional GPUs. \nThese sizes are designed for compute-intensive, graphics-intensive, and visualization workloads.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "FpgaAccelerated", + "value": "FpgaAccelerated", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "FPGA optimized VM sizes are specialized virtual machines available with single or multiple FPGA. \nThese sizes are designed for compute-intensive workloads. This article provides information about the number and type of FPGA, vCPUs, data disks, and NICs. \nStorage throughput and network bandwidth are also included for each size in this grouping.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "HighPerformanceCompute", + "value": "HighPerformanceCompute", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "Azure High Performance Compute VMs are optimized for various HPC workloads such as computational fluid dynamics, finite element analysis, frontend and backend EDA, \nrendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis.", + "decorators": [] + } + ], + "description": "VMCategories defined for Azure VMs.\nSee: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "ArchitectureType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ArchitectureType", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "ARM64", + "value": "ARM64", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "description": "ARM64 Architecture", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "X64", + "value": "X64", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "description": "X64 Architecture", + "decorators": [] + } + ], + "description": "Architecture types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "88", + "kind": "enum", + "name": "CpuManufacturer", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CpuManufacturer", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "90", + "kind": "enumvalue", + "name": "Intel", + "value": "Intel", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "description": "Intel CPU.", + "decorators": [] + }, + { + "$id": "92", + "kind": "enumvalue", + "name": "AMD", + "value": "AMD", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "description": "AMD CPU.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Microsoft", + "value": "Microsoft", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "description": "Microsoft CPU.", + "decorators": [] + }, + { + "$id": "96", + "kind": "enumvalue", + "name": "Ampere", + "value": "Ampere", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "description": "Ampere CPU.", + "decorators": [] + } + ], + "description": "Cpu Manufacturers supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "98", + "kind": "enum", + "name": "WindowsSetupAdditionalInformation_passName", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "100", + "kind": "enumvalue", + "name": "OobeSystem", + "value": "OobeSystem", + "description": "OobeSystem", + "valueType": { + "$ref": "99" + }, + "enumType": { + "$ref": "98" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The WindowsSetupAdditionalInformation_passName", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "101", + "kind": "enum", + "name": "WindowsSetupAdditionalInformation_componentName", + "valueType": { + "$id": "102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "103", + "kind": "enumvalue", + "name": "Microsoft-Windows-Shell-Setup", + "value": "Microsoft-Windows-Shell-Setup", + "description": "Microsoft-Windows-Shell-Setup", + "valueType": { + "$ref": "102" + }, + "enumType": { + "$ref": "101" + } + } + ], + "crossLanguageDefinitionId": "", + "description": "The WindowsSetupAdditionalInformation_componentName", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "104", + "kind": "enum", + "name": "AdditionalInformationSettingNames", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SettingNames", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "106", + "kind": "enumvalue", + "name": "AutoLogon", + "value": "AutoLogon", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "description": "AutoLogon setting", + "decorators": [] + }, + { + "$id": "108", + "kind": "enumvalue", + "name": "FirstLogonCommands", + "value": "FirstLogonCommands", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "description": "FirstLogonCommands setting", + "decorators": [] + } + ], + "description": "Specifies the name of the setting to which the content applies. Possible values\nare: FirstLogonCommands and AutoLogon.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "110", + "kind": "enum", + "name": "ComputeFleetWindowsVMGuestPatchMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchMode", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "112", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "You control the application of patches to a virtual machine.\nYou do this by applying patches manually inside the VM. In this mode,\nautomatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates\nmust be false", + "decorators": [] + }, + { + "$id": "114", + "kind": "enumvalue", + "name": "AutomaticByOS", + "value": "AutomaticByOS", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The virtual machine will automatically be updated by the OS.\nThe property WindowsConfiguration.enableAutomaticUpdates must be true.", + "decorators": [] + }, + { + "$id": "116", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The virtual machine will automatically updated by the platform. The properties\nprovisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true.", + "decorators": [] + } + ], + "description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "118", + "kind": "enum", + "name": "ComputeFleetWindowsPatchAssessmentMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsPatchAssessmentMode", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "120", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "118" + }, + "description": "You control the timing of patch assessments on a virtual machine.", + "decorators": [] + }, + { + "$id": "122", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "118" + }, + "description": "The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "description": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "Unknown Reboot setting", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "IfRequired", + "value": "IfRequired", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "IfRequired Reboot setting", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "Never Reboot setting", + "decorators": [] + }, + { + "$id": "132", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "Always Reboot setting", + "decorators": [] + } + ], + "description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "134", + "kind": "enum", + "name": "ComputeFleetProtocolTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProtocolTypes", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "136", + "kind": "enumvalue", + "name": "Http", + "value": "Http", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "description": "Http protocol", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "Https", + "value": "Https", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "description": "Https protocol", + "decorators": [] + } + ], + "description": "Specifies the protocol of WinRM listener. Possible values are: **http,**\n**https.**", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "140", + "kind": "enum", + "name": "ComputeFleetLinuxVMGuestPatchMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchMode", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "142", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "description": "The virtual machine's default patching configuration is used.", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "description": "The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "146", + "kind": "enum", + "name": "ComputeFleetLinuxPatchAssessmentMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchAssessmentMode", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "148", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "description": "You control the timing of patch assessments on a virtual machine.", + "decorators": [] + }, + { + "$id": "150", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "description": "The platform will trigger periodic patch assessments.The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "description": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual\nmachine.

Possible values are:

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

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "152", + "kind": "enum", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "154", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "description": "Unknown Reboot setting", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "IfRequired", + "value": "IfRequired", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "description": "IfRequired Reboot setting", + "decorators": [] + }, + { + "$id": "158", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "description": "Never Reboot setting", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "description": "Always Reboot setting", + "decorators": [] + } + ], + "description": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "162", + "kind": "enum", + "name": "ComputeFleetCachingTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CachingTypes", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "164", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "162" + }, + "description": "'None' is default for Standard Storage", + "decorators": [] + }, + { + "$id": "166", + "kind": "enumvalue", + "name": "ReadOnly", + "value": "ReadOnly", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "162" + }, + "description": "'ReadOnly' is default for Premium Storage", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "ReadWrite", + "value": "ReadWrite", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "162" + }, + "description": "'ReadWrite' is default for OS Disk", + "decorators": [] + } + ], + "description": "Specifies the caching requirements.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "170", + "kind": "enum", + "name": "ComputeFleetDiskCreateOptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskCreateOptionTypes", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "172", + "kind": "enumvalue", + "name": "FromImage", + "value": "FromImage", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "description": "This value is used when you are using an image to create the virtual machine.\nIf you are using a platform image, you also use the imageReference element\ndescribed above. If you are using a marketplace image, you also use the\nplan element previously described.", + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "Empty", + "value": "Empty", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "description": "This value is used when creating an empty data disk.", + "decorators": [] + }, + { + "$id": "176", + "kind": "enumvalue", + "name": "Attach", + "value": "Attach", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "description": "This value is used when you are using a specialized disk to create the virtual machine.", + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "Copy", + "value": "Copy", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "description": "This value is used to create a data disk from a snapshot or another disk.", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "Restore", + "value": "Restore", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "description": "This value is used to create a data disk from a disk restore point.", + "decorators": [] + } + ], + "description": "Specifies how the virtual machine should be created.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "182", + "kind": "enum", + "name": "ComputeFleetDiffDiskOptions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskOptions", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "184", + "kind": "enumvalue", + "name": "Local", + "value": "Local", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "description": "Local Option.", + "decorators": [] + } + ], + "description": "Specifies the ephemeral disk option for operating system disk.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "186", + "kind": "enum", + "name": "ComputeFleetDiffDiskPlacement", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskPlacement", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "188", + "kind": "enumvalue", + "name": "CacheDisk", + "value": "CacheDisk", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "186" + }, + "description": "CacheDisk option.", + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "ResourceDisk", + "value": "ResourceDisk", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "186" + }, + "description": "Resource Disk option.", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "NvmeDisk", + "value": "NvmeDisk", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "186" + }, + "description": "NvmeDisk option.", + "decorators": [] + } + ], + "description": "Specifies the ephemeral disk placement for operating system disk. This property\ncan be used by user in the request to choose the location i.e, cache disk or\nresource disk space for Ephemeral OS disk provisioning. For more information on\nEphemeral OS disk size requirements, please refer Ephemeral OS disk size\nrequirements for Windows VM at\nhttps://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements\nand Linux VM at\nhttps://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements\nMinimum api-version for NvmeDisk: 2024-03-01.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "194", + "kind": "enum", + "name": "ComputeFleetOperatingSystemTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OperatingSystemTypes", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "196", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "description": "Windows OS type", + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "Linux", + "value": "Linux", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "description": "Linux OS type", + "decorators": [] + } + ], + "description": "This property allows you to specify the type of the OS that is included in the\ndisk if creating a VM from user-image or a specialized VHD. Possible values\nare: **Windows,** **Linux.**", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "200", + "kind": "enum", + "name": "ComputeFleetStorageAccountTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.StorageAccountTypes", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "202", + "kind": "enumvalue", + "name": "StandardLrs", + "value": "Standard_LRS", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "Standard_LRS option.", + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "PremiumLrs", + "value": "Premium_LRS", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "Premium_LRS option.", + "decorators": [] + }, + { + "$id": "206", + "kind": "enumvalue", + "name": "StandardSsdLrd", + "value": "StandardSSD_LRS", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "StandardSSD_LRS option.", + "decorators": [] + }, + { + "$id": "208", + "kind": "enumvalue", + "name": "UltraSsdLrs", + "value": "UltraSSD_LRS", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "UltraSSD_LRS option.", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "PremiumZrs", + "value": "Premium_ZRS", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "Premium_ZRS option.", + "decorators": [] + }, + { + "$id": "212", + "kind": "enumvalue", + "name": "StandardSsdZrs", + "value": "StandardSSD_ZRS", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "StandardSSD_ZRS option.", + "decorators": [] + }, + { + "$id": "214", + "kind": "enumvalue", + "name": "PremiumV2_LRS", + "value": "PremiumV2_LRS", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "description": "PremiumV2_LRS option.", + "decorators": [] + } + ], + "description": "Specifies the storage account type for the managed disk. Managed OS disk\nstorage account type can only be set when you create the scale set. NOTE:\nUltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk.\nStandard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS\nuses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD\nzone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant\nstorage. For more information regarding disks supported for Windows Virtual\nMachines, refer to\nhttps://learn.microsoft.com/azure/virtual-machines/windows/disks-types and, for\nLinux Virtual Machines, refer to\nhttps://learn.microsoft.com/azure/virtual-machines/linux/disks-types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "216", + "kind": "enum", + "name": "ComputeFleetSecurityEncryptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityEncryptionTypes", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "218", + "kind": "enumvalue", + "name": "VMGuestStateOnly", + "value": "VMGuestStateOnly", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "description": "EncryptionType of the managed disk is set to VMGuestStateOnly for encryption\nof just the VMGuestState blob.", + "decorators": [] + }, + { + "$id": "220", + "kind": "enumvalue", + "name": "DiskWithVMGuestState", + "value": "DiskWithVMGuestState", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "description": "EncryptionType of the managed disk is set to DiskWithVMGuestState for encryption\nof the managed disk along with VMGuestState blob.", + "decorators": [] + }, + { + "$id": "222", + "kind": "enumvalue", + "name": "NonPersistedTpm", + "value": "NonPersistedTPM", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "description": "EncryptionType of the managed disk is set to NonPersistedTPM for not persisting\nfirmware state in the VMGuestState blob.", + "decorators": [] + } + ], + "description": "Specifies the EncryptionType of the managed disk.\n**Note:** It can be set for only Confidential VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "224", + "kind": "enum", + "name": "ComputeFleetDiskDeleteOptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskDeleteOptionTypes", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "226", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "description": "If this value is used, the managed disk is deleted when VM gets deleted.", + "decorators": [] + }, + { + "$id": "228", + "kind": "enumvalue", + "name": "Detach", + "value": "Detach", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "description": "If this value is used, the managed disk is retained after VM gets deleted.", + "decorators": [] + } + ], + "description": "Specifies the behavior of the managed disk when the VM gets deleted, for\nexample whether the managed disk is deleted or detached. Supported values are:\n**Delete.** If this value is used, the managed disk is deleted when VM gets\ndeleted. **Detach.** If this value is used, the managed disk is retained after\nVM gets deleted. Minimum api-version: 2021-03-01.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "230", + "kind": "enum", + "name": "ComputeFleetDiskControllerTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskControllerTypes", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "232", + "kind": "enumvalue", + "name": "Scsi", + "value": "SCSI", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "230" + }, + "description": "SCSI disk type", + "decorators": [] + }, + { + "$id": "234", + "kind": "enumvalue", + "name": "Nvme", + "value": "NVMe", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "230" + }, + "description": "NVMe disk type", + "decorators": [] + } + ], + "description": "Specifies the disk controller type configured for the VM and\nVirtualMachineScaleSet. This property is only supported for virtual machines\nwhose operating system disk and VM sku supports Generation 2\n(https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please\ncheck the HyperVGenerations capability returned as part of VM sku capabilities\nin the response of Microsoft.Compute SKUs api for the region contains V2\n(https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more\ninformation about Disk Controller Types supported please refer to\nhttps://aka.ms/azure-diskcontrollertypes.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "236", + "kind": "enum", + "name": "ComputeFleetDomainNameLabelScopeTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DomainNameLabelScopeTypes", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "238", + "kind": "enumvalue", + "name": "TenantReuse", + "value": "TenantReuse", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "description": "TenantReuse type", + "decorators": [] + }, + { + "$id": "240", + "kind": "enumvalue", + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "description": "SubscriptionReuse type", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "description": "ResourceGroupReuse type", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "NoReuse", + "value": "NoReuse", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "description": "NoReuse type", + "decorators": [] + } + ], + "description": "The Domain name label scope.The concatenation of the hashed domain name label\nthat generated according to the policy from domain name label scope and vm\nindex will be the domain name labels of the PublicIPAddress resources that will\nbe created", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "246", + "kind": "enum", + "name": "ComputeFleetIPVersion", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.IPVersion", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "248", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "246" + }, + "description": "IPv4 version", + "decorators": [] + }, + { + "$id": "250", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "246" + }, + "description": "IPv6 version", + "decorators": [] + } + ], + "description": "Available from Api-Version 2017-03-30 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "252", + "kind": "enum", + "name": "ComputeFleetVmDeleteOptions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DeleteOptions", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "254", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "252" + }, + "description": "Delete Option", + "decorators": [] + }, + { + "$id": "256", + "kind": "enumvalue", + "name": "Detach", + "value": "Detach", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "252" + }, + "description": "Detach Option", + "decorators": [] + } + ], + "description": "Specify what happens to the network interface when the VM is deleted", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "258", + "kind": "enum", + "name": "ComputeFleetPublicIPAddressSkuName", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSkuName", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "260", + "kind": "enumvalue", + "name": "Basic", + "value": "Basic", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "description": "Basic sku name", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "description": "Standard sku name", + "decorators": [] + } + ], + "description": "Specify public IP sku name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "264", + "kind": "enum", + "name": "ComputeFleetPublicIPAddressSkuTier", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSkuTier", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "266", + "kind": "enumvalue", + "name": "Regional", + "value": "Regional", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "264" + }, + "description": "Regional sku tier", + "decorators": [] + }, + { + "$id": "268", + "kind": "enumvalue", + "name": "Global", + "value": "Global", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "264" + }, + "description": "Global sku tier", + "decorators": [] + } + ], + "description": "Specify public IP sku tier", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "270", + "kind": "enum", + "name": "ComputeFleetNetworkInterfaceAuxiliaryMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkInterfaceAuxiliaryMode", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "272", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "description": "None Mode", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "AcceleratedConnections", + "value": "AcceleratedConnections", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "description": "AcceleratedConnections Mode", + "decorators": [] + }, + { + "$id": "276", + "kind": "enumvalue", + "name": "Floating", + "value": "Floating", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "description": "Floating Mode", + "decorators": [] + } + ], + "description": "Specifies whether the Auxiliary mode is enabled for the Network Interface\nresource.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "278", + "kind": "enum", + "name": "ComputeFleetNetworkInterfaceAuxiliarySku", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkInterfaceAuxiliarySku", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "280", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "description": "no sku", + "decorators": [] + }, + { + "$id": "282", + "kind": "enumvalue", + "name": "A1", + "value": "A1", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "description": "A1 sku", + "decorators": [] + }, + { + "$id": "284", + "kind": "enumvalue", + "name": "A2", + "value": "A2", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "description": "A2 sku", + "decorators": [] + }, + { + "$id": "286", + "kind": "enumvalue", + "name": "A4", + "value": "A4", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "description": "A4 sku", + "decorators": [] + }, + { + "$id": "288", + "kind": "enumvalue", + "name": "A8", + "value": "A8", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "description": "A8 sku", + "decorators": [] + } + ], + "description": "Specifies whether the Auxiliary sku is enabled for the Network Interface\nresource.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "290", + "kind": "enum", + "name": "ComputeFleetNetworkApiVersion", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkApiVersion", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "292", + "kind": "enumvalue", + "name": "v2020_11_01", + "value": "2020-11-01", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "description": "Initial version supported. Later versions are supported as well.", + "decorators": [] + } + ], + "description": "specifies the Microsoft.Network API version used when creating networking\nresources in the Network Interface Configurations for Virtual Machine Scale Set\nwith orchestration mode 'Flexible'", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "294", + "kind": "enum", + "name": "ComputeFleetSecurityTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityTypes", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "296", + "kind": "enumvalue", + "name": "TrustedLaunch", + "value": "TrustedLaunch", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "294" + }, + "description": "TrustedLaunch security type", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "ConfidentialVM", + "value": "ConfidentialVM", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "294" + }, + "description": "ConfidentialVM security type", + "decorators": [] + } + ], + "description": "Specifies the SecurityType of the virtual machine. It has to be set to any\nspecified value to enable UefiSettings. The default behavior is: UefiSettings\nwill not be enabled unless this property is set.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "300", + "kind": "enum", + "name": "ProxyAgentExecuteMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Mode", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "302", + "kind": "enumvalue", + "name": "Audit", + "value": "Audit", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "description": "Audit Mode", + "decorators": [] + }, + { + "$id": "304", + "kind": "enumvalue", + "name": "Enforce", + "value": "Enforce", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "description": "Enforce Mode", + "decorators": [] + } + ], + "description": "Specifies the mode that ProxyAgent will execute on if the feature is enabled.\nProxyAgent will start to audit or monitor but not enforce access control over\nrequests to host endpoints in Audit mode, while in Enforce mode it will enforce\naccess control. The default value is Enforce mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "306", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "308", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "description": "No managed identity.", + "decorators": [] + }, + { + "$id": "310", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "description": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "312", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "description": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "314", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "description": "System and user assigned managed identity.", + "decorators": [] + } + ], + "description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "316", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "318", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "description": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "320", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "description": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "322", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "description": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "324", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "description": "The entity was created by a key.", + "decorators": [] + } + ], + "description": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "326", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "328", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "description": "Resource has been created.", + "decorators": [] + }, + { + "$id": "330", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "description": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "description": "Resource creation was canceled.", + "decorators": [] + } + ], + "description": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "description": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "338", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "description": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "340", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "description": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "description": "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": "342", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "344", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "342" + }, + "description": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "description": "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": "346", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Versions", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "v2024_11_01", + "value": "2024-11-01", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "description": "Public Api version", + "decorators": [] + } + ], + "description": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "350", + "kind": "model", + "name": "ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "An Compute Fleet resource", + "decorators": [], + "baseModel": { + "$id": "351", + "kind": "model", + "name": "TrackedResource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "352", + "kind": "model", + "name": "Resource", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "353", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "354", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id" + }, + { + "$id": "356", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the resource", + "type": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name" + }, + { + "$id": "358", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "359", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type" + }, + { + "$id": "361", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "362", + "kind": "model", + "name": "SystemData", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "363", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The identity that created the resource.", + "type": { + "$id": "364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy" + }, + { + "$id": "365", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "description": "The type of identity that created the resource.", + "type": { + "$ref": "316" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType" + }, + { + "$id": "366", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "description": "The timestamp of resource creation (UTC).", + "type": { + "$id": "367", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "368", + "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" + }, + { + "$id": "369", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The identity that last modified the resource.", + "type": { + "$id": "370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy" + }, + { + "$id": "371", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "description": "The type of identity that last modified the resource.", + "type": { + "$ref": "316" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType" + }, + { + "$id": "372", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "description": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "373", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "374", + "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" + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData" + } + ] + }, + "properties": [ + { + "$id": "375", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "Resource tags.", + "type": { + "$id": "376", + "kind": "dict", + "keyType": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags" + }, + { + "$id": "379", + "kind": "property", + "name": "location", + "serializedName": "location", + "description": "The geo-location where the resource lives", + "type": { + "$id": "380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location" + } + ] + }, + "properties": [ + { + "$id": "381", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "The resource-specific properties for this resource.", + "type": { + "$id": "382", + "kind": "model", + "name": "ComputeFleetProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Details of the Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "383", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "description": "The status of the last operation.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.provisioningState" + }, + { + "$id": "384", + "kind": "property", + "name": "spotPriorityProfile", + "serializedName": "spotPriorityProfile", + "description": "Configuration Options for Spot instances in Compute Fleet.", + "type": { + "$id": "385", + "kind": "model", + "name": "SpotPriorityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Configuration Options for Spot instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "386", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "description": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "387", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.capacity" + }, + { + "$id": "388", + "kind": "property", + "name": "minCapacity", + "serializedName": "minCapacity", + "description": "Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.", + "type": { + "$id": "389", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.minCapacity" + }, + { + "$id": "390", + "kind": "property", + "name": "maxPricePerVM", + "serializedName": "maxPricePerVM", + "description": "Price per hour of each Spot VM will never exceed this.", + "type": { + "$id": "391", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maxPricePerVM" + }, + { + "$id": "392", + "kind": "property", + "name": "evictionPolicy", + "serializedName": "evictionPolicy", + "description": "Eviction Policy to follow when evicting Spot VMs.", + "type": { + "$ref": "18" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.evictionPolicy" + }, + { + "$id": "393", + "kind": "property", + "name": "allocationStrategy", + "serializedName": "allocationStrategy", + "description": "Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.allocationStrategy" + }, + { + "$id": "394", + "kind": "property", + "name": "IsMaintainEnabled", + "serializedName": "maintain", + "description": "Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.\nIf maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)\nor update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.\nMaintain is enabled by default.", + "type": { + "$id": "395", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maintain" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.spotPriorityProfile" + }, + { + "$id": "396", + "kind": "property", + "name": "regularPriorityProfile", + "serializedName": "regularPriorityProfile", + "description": "Configuration Options for Regular instances in Compute Fleet.", + "type": { + "$id": "397", + "kind": "model", + "name": "RegularPriorityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Configuration Options for Regular instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "398", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "description": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "399", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.capacity" + }, + { + "$id": "400", + "kind": "property", + "name": "minCapacity", + "serializedName": "minCapacity", + "description": "Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.", + "type": { + "$id": "401", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.minCapacity" + }, + { + "$id": "402", + "kind": "property", + "name": "allocationStrategy", + "serializedName": "allocationStrategy", + "description": "Allocation strategy to follow when determining the VM sizes distribution for Regular VMs.", + "type": { + "$ref": "32" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.allocationStrategy" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.regularPriorityProfile" + }, + { + "$id": "403", + "kind": "property", + "name": "vmSizesProfile", + "serializedName": "vmSizesProfile", + "description": "List of VM sizes supported for Compute Fleet", + "type": { + "$id": "404", + "kind": "array", + "name": "ArrayVmSizeProfile", + "valueType": { + "$id": "405", + "kind": "model", + "name": "ComputeFleetVmSizeProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifications about a VM Size. This will also contain the corresponding rank and weight in future.", + "decorators": [], + "properties": [ + { + "$id": "406", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The Sku name (e.g. 'Standard_DS1_v2')", + "type": { + "$id": "407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.name" + }, + { + "$id": "408", + "kind": "property", + "name": "rank", + "serializedName": "rank", + "description": "The rank of the VM size. This is used with 'RegularPriorityAllocationStrategy.Prioritized'\nThe lower the number, the higher the priority. Starting with 0.", + "type": { + "$id": "409", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.rank" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.vmSizesProfile" + }, + { + "$id": "410", + "kind": "property", + "name": "vmAttributes", + "serializedName": "vmAttributes", + "description": "Attribute based Fleet.", + "type": { + "$id": "411", + "kind": "model", + "name": "ComputeFleetVMAttributes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "VMAttributes that will be used to filter VMSizes which will be used to build Fleet.", + "decorators": [], + "properties": [ + { + "$id": "412", + "kind": "property", + "name": "vCpuCount", + "serializedName": "vCpuCount", + "description": "The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified.", + "type": { + "$id": "413", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxInteger", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes.", + "decorators": [], + "properties": [ + { + "$id": "414", + "kind": "property", + "name": "min", + "serializedName": "min", + "description": "Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.", + "type": { + "$id": "415", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.min" + }, + { + "$id": "416", + "kind": "property", + "name": "max", + "serializedName": "max", + "description": "Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.", + "type": { + "$id": "417", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.max" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.vCpuCount" + }, + { + "$id": "418", + "kind": "property", + "name": "memoryInGiB", + "serializedName": "memoryInGiB", + "description": "The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified.", + "type": { + "$id": "419", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxDouble", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "VMAttributes using double values.", + "decorators": [], + "properties": [ + { + "$id": "420", + "kind": "property", + "name": "min", + "serializedName": "min", + "description": "Minimum value. default 0. Double.MinValue()", + "type": { + "$id": "421", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.min" + }, + { + "$id": "422", + "kind": "property", + "name": "max", + "serializedName": "max", + "description": "Maximum value. Double.MaxValue(1.7976931348623157E+308)", + "type": { + "$id": "423", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.max" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiB" + }, + { + "$id": "424", + "kind": "property", + "name": "memoryInGiBPerVCpu", + "serializedName": "memoryInGiBPerVCpu", + "description": "The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiBPerVCpu" + }, + { + "$id": "425", + "kind": "property", + "name": "localStorageSupport", + "serializedName": "localStorageSupport", + "description": "Specifies whether the VMSize supporting local storage should be used to build Fleet or not.\nIncluded - Default if not specified as most Azure VMs support local storage.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageSupport" + }, + { + "$id": "426", + "kind": "property", + "name": "localStorageInGiB", + "serializedName": "localStorageInGiB", + "description": "LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf localStorageSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageInGiB" + }, + { + "$id": "427", + "kind": "property", + "name": "localStorageDiskTypes", + "serializedName": "localStorageDiskTypes", + "description": "The local storage disk types specified as a list. LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf localStorageSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "428", + "kind": "array", + "name": "ArrayLocalStorageDiskType", + "valueType": { + "$ref": "46" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageDiskTypes" + }, + { + "$id": "429", + "kind": "property", + "name": "dataDiskCount", + "serializedName": "dataDiskCount", + "description": "The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "413" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.dataDiskCount" + }, + { + "$id": "430", + "kind": "property", + "name": "networkInterfaceCount", + "serializedName": "networkInterfaceCount", + "description": "The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "413" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkInterfaceCount" + }, + { + "$id": "431", + "kind": "property", + "name": "networkBandwidthInMbps", + "serializedName": "networkBandwidthInMbps", + "description": "The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkBandwidthInMbps" + }, + { + "$id": "432", + "kind": "property", + "name": "rdmaSupport", + "serializedName": "rdmaSupport", + "description": "Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaSupport" + }, + { + "$id": "433", + "kind": "property", + "name": "rdmaNetworkInterfaceCount", + "serializedName": "rdmaNetworkInterfaceCount", + "description": "The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.\nrdmaSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf rdmaSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "413" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaNetworkInterfaceCount" + }, + { + "$id": "434", + "kind": "property", + "name": "acceleratorSupport", + "serializedName": "acceleratorSupport", + "description": "Specifies whether the VMSize supporting accelerator should be used to build Fleet or not.\nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorSupport" + }, + { + "$id": "435", + "kind": "property", + "name": "acceleratorManufacturers", + "serializedName": "acceleratorManufacturers", + "description": "The accelerator manufacturers specified as a list. \nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "436", + "kind": "array", + "name": "ArrayAcceleratorManufacturer", + "valueType": { + "$ref": "52" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorManufacturers" + }, + { + "$id": "437", + "kind": "property", + "name": "acceleratorTypes", + "serializedName": "acceleratorTypes", + "description": "The accelerator types specified as a list. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "438", + "kind": "array", + "name": "ArrayAcceleratorType", + "valueType": { + "$ref": "60" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorTypes" + }, + { + "$id": "439", + "kind": "property", + "name": "acceleratorCount", + "serializedName": "acceleratorCount", + "description": "The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified.\nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "413" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorCount" + }, + { + "$id": "440", + "kind": "property", + "name": "vmCategories", + "serializedName": "vmCategories", + "description": "The VM category specified as a list. Optional parameter.", + "type": { + "$id": "441", + "kind": "array", + "name": "ArrayVmCategory", + "valueType": { + "$ref": "66" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.vmCategories" + }, + { + "$id": "442", + "kind": "property", + "name": "architectureTypes", + "serializedName": "architectureTypes", + "description": "The VM architecture types specified as a list. Optional parameter.", + "type": { + "$id": "443", + "kind": "array", + "name": "ArrayArchitectureType", + "valueType": { + "$ref": "82" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.architectureTypes" + }, + { + "$id": "444", + "kind": "property", + "name": "cpuManufacturers", + "serializedName": "cpuManufacturers", + "description": "The VM CPU manufacturers specified as a list. Optional parameter.", + "type": { + "$id": "445", + "kind": "array", + "name": "ArrayCpuManufacturer", + "valueType": { + "$ref": "88" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.cpuManufacturers" + }, + { + "$id": "446", + "kind": "property", + "name": "burstableSupport", + "serializedName": "burstableSupport", + "description": "Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.burstableSupport" + }, + { + "$id": "447", + "kind": "property", + "name": "excludedVMSizes", + "serializedName": "excludedVMSizes", + "description": "Specifies which VMSizes should be excluded while building Fleet. Optional parameter.", + "type": { + "$id": "448", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.excludedVMSizes" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.vmAttributes" + }, + { + "$id": "450", + "kind": "property", + "name": "additionalLocationsProfile", + "serializedName": "additionalLocationsProfile", + "description": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "type": { + "$id": "451", + "kind": "model", + "name": "AdditionalLocationsProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "decorators": [], + "properties": [ + { + "$id": "452", + "kind": "property", + "name": "locationProfiles", + "serializedName": "locationProfiles", + "description": "The list of location profiles.", + "type": { + "$id": "453", + "kind": "array", + "name": "ArrayLocationProfile", + "valueType": { + "$id": "454", + "kind": "model", + "name": "LocationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional).", + "decorators": [], + "properties": [ + { + "$id": "455", + "kind": "property", + "name": "location", + "serializedName": "location", + "description": "The ARM location name of the additional region. If LocationProfile is specified, then location is required.", + "type": { + "$id": "456", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.location" + }, + { + "$id": "458", + "kind": "property", + "name": "virtualMachineProfileOverride", + "serializedName": "virtualMachineProfileOverride", + "description": "An override for computeProfile.baseVirtualMachineProfile specific to this region. \nThis override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location.", + "type": { + "$id": "459", + "kind": "model", + "name": "ComputeFleetVmProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the base virtual machine profile for fleet", + "decorators": [], + "properties": [ + { + "$id": "460", + "kind": "property", + "name": "osProfile", + "serializedName": "osProfile", + "description": "Specifies the operating system settings for the virtual machines in the scale\nset.", + "type": { + "$id": "461", + "kind": "model", + "name": "ComputeFleetVmssOSProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set OS profile.", + "decorators": [], + "properties": [ + { + "$id": "462", + "kind": "property", + "name": "computerNamePrefix", + "serializedName": "computerNamePrefix", + "description": "Specifies the computer name prefix for all of the virtual machines in the scale\nset. Computer name prefixes must be 1 to 15 characters long.", + "type": { + "$id": "463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.computerNamePrefix" + }, + { + "$id": "464", + "kind": "property", + "name": "adminUsername", + "serializedName": "adminUsername", + "description": "Specifies the name of the administrator account.

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

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

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

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

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

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

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

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

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

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

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

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

For resetting root password, see [Manage users, SSH, and check or\nrepair disks on Azure Linux VMs using the VMAccess\nExtension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)", + "type": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminPassword" + }, + { + "$id": "468", + "kind": "property", + "name": "customData", + "serializedName": "customData", + "description": "Specifies a base-64 encoded string of custom data. The base-64 encoded string\nis decoded to a binary array that is saved as a file on the Virtual Machine.\nThe maximum length of the binary array is 65535 bytes. For using cloud-init for\nyour VM, see [Using cloud-init to customize a Linux VM during\ncreation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)", + "type": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.customData" + }, + { + "$id": "470", + "kind": "property", + "name": "windowsConfiguration", + "serializedName": "windowsConfiguration", + "description": "Specifies Windows operating system settings on the virtual machine.", + "type": { + "$id": "471", + "kind": "model", + "name": "ComputeFleetWindowsConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies Windows operating system settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "472", + "kind": "property", + "name": "IsVmAgentProvisioned", + "serializedName": "provisionVMAgent", + "description": "Indicates whether virtual machine agent should be provisioned on the virtual\nmachine. When this property is not specified in the request body, it is set to\ntrue by default. This will ensure that VM Agent is installed on the VM so that\nextensions can be added to the VM later.", + "type": { + "$id": "473", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.provisionVMAgent" + }, + { + "$id": "474", + "kind": "property", + "name": "IsAutomaticUpdatesEnabled", + "serializedName": "enableAutomaticUpdates", + "description": "Indicates whether Automatic Updates is enabled for the Windows virtual machine.\nDefault value is true. For virtual machine scale sets, this property can be\nupdated and updates will take effect on OS reprovisioning.", + "type": { + "$id": "475", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableAutomaticUpdates" + }, + { + "$id": "476", + "kind": "property", + "name": "timeZone", + "serializedName": "timeZone", + "description": "Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\".\nPossible values can be\n[TimeZoneInfo.Id](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id)\nvalue from time zones returned by\n[TimeZoneInfo.GetSystemTimeZones](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).", + "type": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.timeZone" + }, + { + "$id": "478", + "kind": "property", + "name": "additionalUnattendContent", + "serializedName": "additionalUnattendContent", + "description": "Specifies additional base-64 encoded XML formatted information that can be\nincluded in the Unattend.xml file, which is used by Windows Setup.", + "type": { + "$id": "479", + "kind": "array", + "name": "ArrayAdditionalUnattendContent", + "valueType": { + "$id": "480", + "kind": "model", + "name": "WindowsSetupAdditionalInformation", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies additional XML formatted information that can be included in the\nUnattend.xml file, which is used by Windows Setup. Contents are defined by\nsetting name, component name, and the pass in which the content is applied.", + "decorators": [], + "properties": [ + { + "$id": "481", + "kind": "property", + "name": "passName", + "serializedName": "passName", + "description": "The pass name. Currently, the only allowable value is OobeSystem.", + "type": { + "$id": "482", + "kind": "constant", + "valueType": { + "$ref": "98" + }, + "value": "OobeSystem", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.passName" + }, + { + "$id": "483", + "kind": "property", + "name": "componentName", + "serializedName": "componentName", + "description": "The component name. Currently, the only allowable value is\nMicrosoft-Windows-Shell-Setup.", + "type": { + "$id": "484", + "kind": "constant", + "valueType": { + "$ref": "101" + }, + "value": "Microsoft-Windows-Shell-Setup", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.componentName" + }, + { + "$id": "485", + "kind": "property", + "name": "settingName", + "serializedName": "settingName", + "description": "Specifies the name of the setting to which the content applies. Possible values\nare: FirstLogonCommands and AutoLogon.", + "type": { + "$ref": "104" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.settingName" + }, + { + "$id": "486", + "kind": "property", + "name": "content", + "serializedName": "content", + "description": "Specifies the XML formatted content that is added to the unattend.xml file for\nthe specified path and component. The XML must be less than 4KB and must\ninclude the root element for the setting or feature that is being inserted.", + "type": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.content" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.additionalUnattendContent" + }, + { + "$id": "488", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "description": "[Preview Feature] Specifies settings related to VM Guest Patching on Windows.", + "type": { + "$id": "489", + "kind": "model", + "name": "ComputeFleetVmGuestPatchSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies settings related to VM Guest Patching on Windows.", + "decorators": [], + "properties": [ + { + "$id": "490", + "kind": "property", + "name": "patchMode", + "serializedName": "patchMode", + "description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.

Possible values are:

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

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

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

Possible values are:

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

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "type": { + "$ref": "118" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.assessmentMode" + }, + { + "$id": "494", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Windows.", + "type": { + "$id": "495", + "kind": "model", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Windows patch settings.", + "decorators": [], + "properties": [ + { + "$id": "496", + "kind": "property", + "name": "rebootSetting", + "serializedName": "rebootSetting", + "description": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "type": { + "$ref": "124" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings.rebootSetting" + }, + { + "$id": "497", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "description": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "498", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.automaticByPlatformSettings" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.patchSettings" + }, + { + "$id": "499", + "kind": "property", + "name": "winRM", + "serializedName": "winRM", + "description": "Specifies the Windows Remote Management listeners. This enables remote Windows\nPowerShell.", + "type": { + "$id": "500", + "kind": "model", + "name": "WinRMConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes Windows Remote Management configuration of the VM", + "decorators": [], + "properties": [ + { + "$id": "501", + "kind": "property", + "name": "listeners", + "serializedName": "listeners", + "description": "The list of Windows Remote Management listeners", + "type": { + "$id": "502", + "kind": "array", + "name": "ArrayWinRmListener", + "valueType": { + "$id": "503", + "kind": "model", + "name": "ComputeFleetWinRMListener", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes Protocol and thumbprint of Windows Remote Management listener", + "decorators": [], + "properties": [ + { + "$id": "504", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "description": "Specifies the protocol of WinRM listener. Possible values are: **http,**\n**https.**", + "type": { + "$ref": "134" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener.protocol" + }, + { + "$id": "505", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "description": "This is the URL of a certificate that has been uploaded to Key Vault as a\nsecret. For adding a secret to the Key Vault, see [Add a key or secret to the\nkey\nvault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).\nIn this case, your certificate needs to be the Base64 encoding of the following\nJSON Object which is encoded in UTF-8:

{
\n\"data\":\"\",
\"dataType\":\"pfx\",
\n\"password\":\"\"
}
To install certificates on a virtual\nmachine it is recommended to use the [Azure Key Vault virtual machine extension\nfor\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "506", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener.certificateUrl" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration.listeners" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.winRM" + }, + { + "$id": "507", + "kind": "property", + "name": "IsVmAgentPlatformUpdatesEnabled", + "serializedName": "enableVMAgentPlatformUpdates", + "description": "Indicates whether VMAgent Platform Updates is enabled for the Windows virtual\nmachine. Default value is false.", + "type": { + "$id": "508", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableVMAgentPlatformUpdates" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.windowsConfiguration" + }, + { + "$id": "509", + "kind": "property", + "name": "linuxConfiguration", + "serializedName": "linuxConfiguration", + "description": "Specifies the Linux operating system settings on the virtual machine. For a\nlist of supported Linux distributions, see [Linux on Azure-Endorsed\nDistributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).", + "type": { + "$id": "510", + "kind": "model", + "name": "ComputeFleetLinuxConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the Linux operating system settings on the virtual machine. For a\nlist of supported Linux distributions, see [Linux on Azure-Endorsed\nDistributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).", + "decorators": [], + "properties": [ + { + "$id": "511", + "kind": "property", + "name": "IsPasswordAuthenticationDisabled", + "serializedName": "disablePasswordAuthentication", + "description": "Specifies whether password authentication should be disabled.", + "type": { + "$id": "512", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.disablePasswordAuthentication" + }, + { + "$id": "513", + "kind": "property", + "name": "ssh", + "serializedName": "ssh", + "description": "Specifies the ssh key configuration for a Linux OS.", + "type": { + "$id": "514", + "kind": "model", + "name": "ComputeFleetSshConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "SSH configuration for Linux based VMs running on Azure", + "decorators": [], + "properties": [ + { + "$id": "515", + "kind": "property", + "name": "publicKeys", + "serializedName": "publicKeys", + "description": "The list of SSH public keys used to authenticate with linux based VMs.", + "type": { + "$id": "516", + "kind": "array", + "name": "ArraySshPublicKey", + "valueType": { + "$id": "517", + "kind": "model", + "name": "ComputeFleetSshPublicKey", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Contains information about SSH certificate public key and the path on the Linux\nVM where the public key is placed.", + "decorators": [], + "properties": [ + { + "$id": "518", + "kind": "property", + "name": "path", + "serializedName": "path", + "description": "Specifies the full path on the created VM where ssh public key is stored. If\nthe file already exists, the specified key is appended to the file. Example:\n/home/user/.ssh/authorized_keys", + "type": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.path" + }, + { + "$id": "520", + "kind": "property", + "name": "keyData", + "serializedName": "keyData", + "description": "SSH public key certificate used to authenticate with the VM through ssh. The\nkey needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys,\nsee [Create SSH keys on Linux and Mac for Linux VMs in\nAzure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).", + "type": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.keyData" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration.publicKeys" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.ssh" + }, + { + "$id": "522", + "kind": "property", + "name": "IsVmAgentProvisioned", + "serializedName": "provisionVMAgent", + "description": "Indicates whether virtual machine agent should be provisioned on the virtual\nmachine. When this property is not specified in the request body, default\nbehavior is to set it to true. This will ensure that VM Agent is installed on\nthe VM so that extensions can be added to the VM later.", + "type": { + "$id": "523", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.provisionVMAgent" + }, + { + "$id": "524", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "description": "[Preview Feature] Specifies settings related to VM Guest Patching on Linux.", + "type": { + "$id": "525", + "kind": "model", + "name": "ComputeFleetLinuxPatchSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies settings related to VM Guest Patching on Linux.", + "decorators": [], + "properties": [ + { + "$id": "526", + "kind": "property", + "name": "patchMode", + "serializedName": "patchMode", + "description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.

Possible values are:

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

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

Possible values are:

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

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "type": { + "$ref": "146" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.assessmentMode" + }, + { + "$id": "528", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Linux.", + "type": { + "$id": "529", + "kind": "model", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Linux patch settings.", + "decorators": [], + "properties": [ + { + "$id": "530", + "kind": "property", + "name": "rebootSetting", + "serializedName": "rebootSetting", + "description": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "type": { + "$ref": "152" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings.rebootSetting" + }, + { + "$id": "531", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "description": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "532", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.automaticByPlatformSettings" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.patchSettings" + }, + { + "$id": "533", + "kind": "property", + "name": "IsVmAgentPlatformUpdatesEnabled", + "serializedName": "enableVMAgentPlatformUpdates", + "description": "Indicates whether VMAgent Platform Updates is enabled for the Linux virtual\nmachine. Default value is false.", + "type": { + "$id": "534", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.enableVMAgentPlatformUpdates" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.linuxConfiguration" + }, + { + "$id": "535", + "kind": "property", + "name": "secrets", + "serializedName": "secrets", + "description": "Specifies set of certificates that should be installed onto the virtual\nmachines in the scale set. To install certificates on a virtual machine it is\nrecommended to use the [Azure Key Vault virtual machine extension for\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "536", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "537", + "kind": "model", + "name": "ComputeFleetVaultSecretGroup", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a set of certificates which are all in the same Key Vault.", + "decorators": [], + "properties": [ + { + "$id": "538", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "description": "The relative URL of the Key Vault containing all of the certificates in\nVaultCertificates.", + "type": { + "$id": "539", + "kind": "model", + "name": "SubResource", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes SubResource", + "decorators": [], + "properties": [ + { + "$id": "540", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "541", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource.id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup.sourceVault" + }, + { + "$id": "543", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "description": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "544", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "545", + "kind": "model", + "name": "ComputeFleetVaultCertificate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a single certificate reference in a Key Vault, and where the\ncertificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "546", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "description": "This is the URL of a certificate that has been uploaded to Key Vault as a\nsecret. For adding a secret to the Key Vault, see [Add a key or secret to the\nkey\nvault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).\nIn this case, your certificate needs to be It is the Base64 encoding of the\nfollowing JSON Object which is encoded in UTF-8:

{
\n\"data\":\"\",
\"dataType\":\"pfx\",
\n\"password\":\"\"
}
To install certificates on a virtual\nmachine it is recommended to use the [Azure Key Vault virtual machine extension\nfor\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "547", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateUrl" + }, + { + "$id": "548", + "kind": "property", + "name": "certificateStore", + "serializedName": "certificateStore", + "description": "For Windows VMs, specifies the certificate store on the Virtual Machine to\nwhich the certificate should be added. The specified certificate store is\nimplicitly in the LocalMachine account. For Linux VMs, the certificate file is\nplaced under the /var/lib/waagent directory, with the file name\n<UppercaseThumbprint>.crt for the X509 certificate file and\n<UppercaseThumbprint>.prv for private key. Both of these files are .pem\nformatted.", + "type": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateStore" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup.vaultCertificates" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.secrets" + }, + { + "$id": "550", + "kind": "property", + "name": "AreExtensionOperationsAllowed", + "serializedName": "allowExtensionOperations", + "description": "Specifies whether extension operations should be allowed on the virtual machine\nscale set. This may only be set to False when no extensions are present on the\nvirtual machine scale set.", + "type": { + "$id": "551", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.allowExtensionOperations" + }, + { + "$id": "552", + "kind": "property", + "name": "IsGuestProvisionSignalRequired", + "serializedName": "requireGuestProvisionSignal", + "description": "Optional property which must either be set to True or omitted.", + "type": { + "$id": "553", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.requireGuestProvisionSignal" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.osProfile" + }, + { + "$id": "554", + "kind": "property", + "name": "storageProfile", + "serializedName": "storageProfile", + "description": "Specifies the storage settings for the virtual machine disks.", + "type": { + "$id": "555", + "kind": "model", + "name": "ComputeFleetVmssStorageProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set storage profile.", + "decorators": [], + "properties": [ + { + "$id": "556", + "kind": "property", + "name": "imageReference", + "serializedName": "imageReference", + "description": "Specifies information about the image to use. You can specify information about\nplatform images, marketplace images, or virtual machine images. This element is\nrequired when you want to use a platform image, marketplace image, or virtual\nmachine image, but is not used in other creation operations.", + "type": { + "$id": "557", + "kind": "model", + "name": "ComputeFleetImageReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies information about the image to use. You can specify information about\nplatform images, marketplace images, or virtual machine images. This element is\nrequired when you want to use a platform image, marketplace image, or virtual\nmachine image, but is not used in other creation operations. NOTE: Image\nreference publisher and offer can only be set when you create the scale set.", + "decorators": [], + "properties": [ + { + "$id": "558", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "559", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.id" + }, + { + "$id": "561", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The image publisher.", + "type": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.publisher" + }, + { + "$id": "563", + "kind": "property", + "name": "offer", + "serializedName": "offer", + "description": "Specifies the offer of the platform image or marketplace image used to create\nthe virtual machine.", + "type": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.offer" + }, + { + "$id": "565", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "description": "The image SKU.", + "type": { + "$id": "566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sku" + }, + { + "$id": "567", + "kind": "property", + "name": "version", + "serializedName": "version", + "description": "Specifies the version of the platform image or marketplace image used to create\nthe virtual machine. The allowed formats are Major.Minor.Build or 'latest'.\nMajor, Minor, and Build are decimal numbers. Specify 'latest' to use the latest\nversion of an image available at deploy time. Even if you use 'latest', the VM\nimage will not automatically update after deploy time even if a new version\nbecomes available. Please do not use field 'version' for gallery image\ndeployment, gallery image should always use 'id' field for deployment, to use 'latest'\nversion of gallery image, just set\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'\nin the 'id' field without version input.", + "type": { + "$id": "568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.version" + }, + { + "$id": "569", + "kind": "property", + "name": "exactVersion", + "serializedName": "exactVersion", + "description": "Specifies in decimal numbers, the version of platform image or marketplace\nimage used to create the virtual machine. This readonly field differs from 'version',\nonly if the value specified in 'version' field is 'latest'.", + "type": { + "$id": "570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.exactVersion" + }, + { + "$id": "571", + "kind": "property", + "name": "sharedGalleryImageId", + "serializedName": "sharedGalleryImageId", + "description": "Specified the shared gallery image unique id for vm deployment. This can be\nfetched from shared gallery image GET call.", + "type": { + "$id": "572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sharedGalleryImageId" + }, + { + "$id": "573", + "kind": "property", + "name": "communityGalleryImageId", + "serializedName": "communityGalleryImageId", + "description": "Specified the community gallery image unique id for vm deployment. This can be\nfetched from community gallery image GET call.", + "type": { + "$id": "574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.communityGalleryImageId" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.imageReference" + }, + { + "$id": "575", + "kind": "property", + "name": "osDisk", + "serializedName": "osDisk", + "description": "Specifies information about the operating system disk used by the virtual\nmachines in the scale set. For more information about disks, see [About disks\nand VHDs for Azure virtual\nmachines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", + "type": { + "$id": "576", + "kind": "model", + "name": "ComputeFleetVmssOSDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set operating system disk.", + "decorators": [], + "properties": [ + { + "$id": "577", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The disk name.", + "type": { + "$id": "578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.name" + }, + { + "$id": "579", + "kind": "property", + "name": "caching", + "serializedName": "caching", + "description": "Specifies the caching requirements. Possible values are: **None,**\n**ReadOnly,** **ReadWrite.** The default values are: **None for Standard\nstorage. ReadOnly for Premium storage.**", + "type": { + "$ref": "162" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.caching" + }, + { + "$id": "580", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "description": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "581", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.writeAcceleratorEnabled" + }, + { + "$id": "582", + "kind": "property", + "name": "createOption", + "serializedName": "createOption", + "description": "Specifies how the virtual machines in the scale set should be created. The only\nallowed value is: **FromImage.** This value is used when you are using an image\nto create the virtual machine. If you are using a platform image, you also use\nthe imageReference element described above. If you are using a marketplace\nimage, you also use the plan element previously described.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.createOption" + }, + { + "$id": "583", + "kind": "property", + "name": "diffDiskSettings", + "serializedName": "diffDiskSettings", + "description": "Specifies the ephemeral disk Settings for the operating system disk used by the\nvirtual machine scale set.", + "type": { + "$id": "584", + "kind": "model", + "name": "ComputeFleetDiffDiskSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the parameters of ephemeral disk settings that can be specified for\noperating system disk. **Note:** The ephemeral disk settings can only be\nspecified for managed disk.", + "decorators": [], + "properties": [ + { + "$id": "585", + "kind": "property", + "name": "option", + "serializedName": "option", + "description": "Specifies the ephemeral disk settings for operating system disk.", + "type": { + "$ref": "182" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings.option" + }, + { + "$id": "586", + "kind": "property", + "name": "placement", + "serializedName": "placement", + "description": "Specifies the ephemeral disk placement for operating system disk. Possible\nvalues are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:\n**CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**\nis used. Refer to the VM size documentation for Windows VM at\nhttps://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at\nhttps://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM\nsizes exposes a cache disk.", + "type": { + "$ref": "186" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings.placement" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diffDiskSettings" + }, + { + "$id": "587", + "kind": "property", + "name": "diskSizeGB", + "serializedName": "diskSizeGB", + "description": "Specifies the size of an empty data disk in gigabytes. This element can be used\nto overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB'\nis the number of bytes x 1024^3 for the disk and the value cannot\nbe larger than 1023.", + "type": { + "$id": "588", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diskSizeGB" + }, + { + "$id": "589", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "description": "This property allows you to specify the type of the OS that is included in the\ndisk if creating a VM from user-image or a specialized VHD. Possible values\nare: **Windows,** **Linux.**", + "type": { + "$ref": "194" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.osType" + }, + { + "$id": "590", + "kind": "property", + "name": "image", + "serializedName": "image", + "description": "Specifies information about the unmanaged user image to base the scale set on.", + "type": { + "$id": "591", + "kind": "model", + "name": "ComputeFleetVirtualHardDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the uri of a disk.", + "decorators": [], + "properties": [ + { + "$id": "592", + "kind": "property", + "name": "uri", + "serializedName": "uri", + "description": "Specifies the virtual hard disk's uri.", + "type": { + "$id": "593", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk.uri" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.image" + }, + { + "$id": "594", + "kind": "property", + "name": "vhdContainers", + "serializedName": "vhdContainers", + "description": "Specifies the container urls that are used to store operating system disks for\nthe scale set.", + "type": { + "$id": "595", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.vhdContainers" + }, + { + "$id": "597", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "description": "The managed disk parameters.", + "type": { + "$id": "598", + "kind": "model", + "name": "ComputeFleetVmssManagedDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the parameters of a ScaleSet managed disk.", + "decorators": [], + "properties": [ + { + "$id": "599", + "kind": "property", + "name": "storageAccountType", + "serializedName": "storageAccountType", + "description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can\nonly be used with data disks, it cannot be used with OS Disk.", + "type": { + "$ref": "200" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.storageAccountType" + }, + { + "$id": "600", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "description": "Specifies the customer managed disk encryption set resource id for the managed\ndisk.", + "type": { + "$id": "601", + "kind": "model", + "name": "DiskEncryptionSetParameters", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the parameter of customer managed disk encryption set resource id\nthat can be specified for disk. **Note:** The disk encryption set resource id\ncan only be specified for managed disk. Please refer\nhttps://aka.ms/mdssewithcmkoverview for more details.", + "decorators": [], + "properties": [ + { + "$id": "602", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "603", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters.id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.diskEncryptionSet" + }, + { + "$id": "605", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "description": "Specifies the security profile for the managed disk.", + "type": { + "$id": "606", + "kind": "model", + "name": "ComputeFleetVMDiskSecurityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the security profile settings for the managed disk. **Note:** It can\nonly be set for Confidential VMs.", + "decorators": [], + "properties": [ + { + "$id": "607", + "kind": "property", + "name": "securityEncryptionType", + "serializedName": "securityEncryptionType", + "description": "Specifies the EncryptionType of the managed disk. It is set to\nDiskWithVMGuestState for encryption of the managed disk along with VMGuestState\nblob, VMGuestStateOnly for encryption of just the VMGuestState blob, and\nNonPersistedTPM for not persisting firmware state in the VMGuestState blob..\n**Note:** It can be set for only Confidential VMs.", + "type": { + "$ref": "216" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile.securityEncryptionType" + }, + { + "$id": "608", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "description": "Specifies the customer managed disk encryption set resource id for the managed\ndisk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and\nVMGuest blob.", + "type": { + "$ref": "601" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile.diskEncryptionSet" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.securityProfile" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.managedDisk" + }, + { + "$id": "609", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "description": "Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion\n(This feature is available for VMSS with Flexible OrchestrationMode only).\n

Possible values:

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

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

The\ndefault value is set to **Delete**. For an Ephemeral OS Disk, the default value\nis set to **Delete**. User cannot change the delete option for Ephemeral OS\nDisk.", + "type": { + "$ref": "224" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.deleteOption" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.osDisk" + }, + { + "$id": "610", + "kind": "property", + "name": "dataDisks", + "serializedName": "dataDisks", + "description": "Specifies the parameters that are used to add data disks to the virtual\nmachines in the scale set. For more information about disks, see [About disks\nand VHDs for Azure virtual\nmachines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", + "type": { + "$id": "611", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetDataDisk", + "valueType": { + "$id": "612", + "kind": "model", + "name": "ComputeFleetVmssDataDisk", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set data disk.", + "decorators": [], + "properties": [ + { + "$id": "613", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The disk name.", + "type": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.name" + }, + { + "$id": "615", + "kind": "property", + "name": "lun", + "serializedName": "lun", + "description": "Specifies the logical unit number of the data disk. This value is used to\nidentify data disks within the VM and therefore must be unique for each data\ndisk attached to a VM.", + "type": { + "$id": "616", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.lun" + }, + { + "$id": "617", + "kind": "property", + "name": "caching", + "serializedName": "caching", + "description": "Specifies the caching requirements. Possible values are: **None,**\n**ReadOnly,** **ReadWrite.** The default values are: **None for Standard\nstorage. ReadOnly for Premium storage.**", + "type": { + "$ref": "162" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.caching" + }, + { + "$id": "618", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "description": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "619", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.writeAcceleratorEnabled" + }, + { + "$id": "620", + "kind": "property", + "name": "createOption", + "serializedName": "createOption", + "description": "The create option.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.createOption" + }, + { + "$id": "621", + "kind": "property", + "name": "diskSizeGB", + "serializedName": "diskSizeGB", + "description": "Specifies the size of an empty data disk in gigabytes. This element can be used\nto overwrite the size of the disk in a virtual machine image. The property\ndiskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be\nlarger than 1023.", + "type": { + "$id": "622", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskSizeGB" + }, + { + "$id": "623", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "description": "The managed disk parameters.", + "type": { + "$ref": "598" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.managedDisk" + }, + { + "$id": "624", + "kind": "property", + "name": "DiskIopsReadWrite", + "serializedName": "diskIOPSReadWrite", + "description": "Specifies the Read-Write IOPS for the managed disk. Should be used only when\nStorageAccountType is UltraSSD_LRS. If not specified, a default value would be\nassigned based on diskSizeGB.", + "type": { + "$id": "625", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskIOPSReadWrite" + }, + { + "$id": "626", + "kind": "property", + "name": "DiskMbpsReadWrite", + "serializedName": "diskMBpsReadWrite", + "description": "Specifies the bandwidth in MB per second for the managed disk. Should be used\nonly when StorageAccountType is UltraSSD_LRS. If not specified, a default value\nwould be assigned based on diskSizeGB.", + "type": { + "$id": "627", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskMBpsReadWrite" + }, + { + "$id": "628", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "description": "Specifies whether data disk should be deleted or detached upon VMSS Flex\ndeletion (This feature is available for VMSS with Flexible OrchestrationMode\nonly).

Possible values:

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

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

The default value is set to **Delete**.", + "type": { + "$ref": "224" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.deleteOption" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.dataDisks" + }, + { + "$id": "629", + "kind": "property", + "name": "diskControllerType", + "serializedName": "diskControllerType", + "description": "Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01", + "type": { + "$ref": "230" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.diskControllerType" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.storageProfile" + }, + { + "$id": "630", + "kind": "property", + "name": "networkProfile", + "serializedName": "networkProfile", + "description": "Specifies properties of the network interfaces of the virtual machines in the\nscale set.", + "type": { + "$id": "631", + "kind": "model", + "name": "ComputeFleetVmssNetworkProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set network profile.", + "decorators": [], + "properties": [ + { + "$id": "632", + "kind": "property", + "name": "healthProbe", + "serializedName": "healthProbe", + "description": "A reference to a load balancer probe used to determine the health of an\ninstance in the virtual machine scale set. The reference will be in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.", + "type": { + "$id": "633", + "kind": "model", + "name": "ApiEntityReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "The API entity reference.", + "decorators": [], + "properties": [ + { + "$id": "634", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The ARM resource id in the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", + "type": { + "$id": "635", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference.id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.healthProbe" + }, + { + "$id": "637", + "kind": "property", + "name": "networkInterfaceConfigurations", + "serializedName": "networkInterfaceConfigurations", + "description": "The list of network configurations.", + "type": { + "$id": "638", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetNetworkConfiguration", + "valueType": { + "$id": "639", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set network profile's network configurations.", + "decorators": [], + "properties": [ + { + "$id": "640", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The network configuration name.", + "type": { + "$id": "641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.name" + }, + { + "$id": "642", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes a virtual machine scale set network profile's IP configuration.", + "type": { + "$id": "643", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfigurationProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "644", + "kind": "property", + "name": "IsPrimary", + "serializedName": "primary", + "description": "Specifies the primary network interface in case the virtual machine has more\nthan 1 network interface.", + "type": { + "$id": "645", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.primary" + }, + { + "$id": "646", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "description": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "647", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableAcceleratedNetworking" + }, + { + "$id": "648", + "kind": "property", + "name": "IsTcpStateTrackingDisabled", + "serializedName": "disableTcpStateTracking", + "description": "Specifies whether the network interface is disabled for tcp state tracking.", + "type": { + "$id": "649", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking" + }, + { + "$id": "650", + "kind": "property", + "name": "IsFpgaEnabled", + "serializedName": "enableFpga", + "description": "Specifies whether the network interface is FPGA networking-enabled.", + "type": { + "$id": "651", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableFpga" + }, + { + "$id": "652", + "kind": "property", + "name": "networkSecurityGroup", + "serializedName": "networkSecurityGroup", + "description": "The network security group.", + "type": { + "$ref": "539" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.networkSecurityGroup" + }, + { + "$id": "653", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "description": "The dns settings to be applied on the network interfaces.", + "type": { + "$id": "654", + "kind": "model", + "name": "ComputeFleetVmssNetworkDnsSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "655", + "kind": "property", + "name": "dnsServers", + "serializedName": "dnsServers", + "description": "List of DNS servers IP addresses", + "type": { + "$id": "656", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings.dnsServers" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.dnsSettings" + }, + { + "$id": "658", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "description": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "659", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpConfiguration", + "valueType": { + "$id": "660", + "kind": "model", + "name": "ComputeFleetVmssIPConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "661", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The IP configuration name.", + "type": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.name" + }, + { + "$id": "663", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "type": { + "$id": "664", + "kind": "model", + "name": "ComputeFleetVmssIPConfigurationProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "decorators": [], + "properties": [ + { + "$id": "665", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "description": "Specifies the identifier of the subnet.", + "type": { + "$ref": "633" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.subnet" + }, + { + "$id": "666", + "kind": "property", + "name": "IsPrimary", + "serializedName": "primary", + "description": "Specifies the primary network interface in case the virtual machine has more\nthan 1 network interface.", + "type": { + "$id": "667", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.primary" + }, + { + "$id": "668", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "description": "The publicIPAddressConfiguration.", + "type": { + "$id": "669", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfiguration", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "670", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The publicIP address configuration name.", + "type": { + "$id": "671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.name" + }, + { + "$id": "672", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "type": { + "$id": "673", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfigurationProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "674", + "kind": "property", + "name": "idleTimeoutInMinutes", + "serializedName": "idleTimeoutInMinutes", + "description": "The idle timeout of the public IP address.", + "type": { + "$id": "675", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.idleTimeoutInMinutes" + }, + { + "$id": "676", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "description": "The dns settings to be applied on the publicIP addresses .", + "type": { + "$id": "677", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressDnsSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "678", + "kind": "property", + "name": "domainNameLabel", + "serializedName": "domainNameLabel", + "description": "The Domain name label.The concatenation of the domain name label and vm index\nwill be the domain name labels of the PublicIPAddress resources that will be\ncreated", + "type": { + "$id": "679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabel" + }, + { + "$id": "680", + "kind": "property", + "name": "domainNameLabelScope", + "serializedName": "domainNameLabelScope", + "description": "The Domain name label scope.The concatenation of the hashed domain name label\nthat generated according to the policy from domain name label scope and vm\nindex will be the domain name labels of the PublicIPAddress resources that will\nbe created", + "type": { + "$ref": "236" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabelScope" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.dnsSettings" + }, + { + "$id": "681", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "description": "The list of IP tags associated with the public IP address.", + "type": { + "$id": "682", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpTag", + "valueType": { + "$id": "683", + "kind": "model", + "name": "ComputeFleetVmssIPTag", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Contains the IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "684", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "description": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.ipTagType" + }, + { + "$id": "686", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "description": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.tag" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags" + }, + { + "$id": "688", + "kind": "property", + "name": "publicIPPrefix", + "serializedName": "publicIPPrefix", + "description": "The PublicIPPrefix from which to allocate publicIP addresses.", + "type": { + "$ref": "539" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPPrefix" + }, + { + "$id": "689", + "kind": "property", + "name": "publicIPAddressVersion", + "serializedName": "publicIPAddressVersion", + "description": "Available from Api-Version 2019-07-01 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "type": { + "$ref": "246" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPAddressVersion" + }, + { + "$id": "690", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "description": "Specify what happens to the public IP when the VM is deleted", + "type": { + "$ref": "252" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.deleteOption" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.properties" + }, + { + "$id": "691", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "description": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "type": { + "$id": "692", + "kind": "model", + "name": "ComputeFleetPublicIPAddressSku", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "decorators": [], + "properties": [ + { + "$id": "693", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "Specify public IP sku name", + "type": { + "$ref": "258" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku.name" + }, + { + "$id": "694", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "description": "Specify public IP sku tier", + "type": { + "$ref": "264" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku.tier" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.sku" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.publicIPAddressConfiguration" + }, + { + "$id": "695", + "kind": "property", + "name": "privateIPAddressVersion", + "serializedName": "privateIPAddressVersion", + "description": "Available from Api-Version 2017-03-30 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "type": { + "$ref": "246" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.privateIPAddressVersion" + }, + { + "$id": "696", + "kind": "property", + "name": "applicationGatewayBackendAddressPools", + "serializedName": "applicationGatewayBackendAddressPools", + "description": "Specifies an array of references to backend address pools of application\ngateways. A scale set can reference backend address pools of multiple\napplication gateways. Multiple scale sets cannot use the same application\ngateway.", + "type": { + "$id": "697", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "539" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools" + }, + { + "$id": "698", + "kind": "property", + "name": "applicationSecurityGroups", + "serializedName": "applicationSecurityGroups", + "description": "Specifies an array of references to application security group.", + "type": { + "$id": "699", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "539" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups" + }, + { + "$id": "700", + "kind": "property", + "name": "loadBalancerBackendAddressPools", + "serializedName": "loadBalancerBackendAddressPools", + "description": "Specifies an array of references to backend address pools of load balancers. A\nscale set can reference backend address pools of one public and one internal\nload balancer. Multiple scale sets cannot use the same basic sku load balancer.", + "type": { + "$id": "701", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "539" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools" + }, + { + "$id": "702", + "kind": "property", + "name": "loadBalancerInboundNatPools", + "serializedName": "loadBalancerInboundNatPools", + "description": "Specifies an array of references to inbound Nat pools of the load balancers. A\nscale set can reference inbound nat pools of one public and one internal load\nbalancer. Multiple scale sets cannot use the same basic sku load balancer.", + "type": { + "$id": "703", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "539" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.properties" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations" + }, + { + "$id": "704", + "kind": "property", + "name": "IsIPForwardingEnabled", + "serializedName": "enableIPForwarding", + "description": "Whether IP forwarding enabled on this NIC.", + "type": { + "$id": "705", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableIPForwarding" + }, + { + "$id": "706", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "description": "Specify what happens to the network interface when the VM is deleted", + "type": { + "$ref": "252" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.deleteOption" + }, + { + "$id": "707", + "kind": "property", + "name": "auxiliaryMode", + "serializedName": "auxiliaryMode", + "description": "Specifies whether the Auxiliary mode is enabled for the Network Interface\nresource.", + "type": { + "$ref": "270" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.auxiliaryMode" + }, + { + "$id": "708", + "kind": "property", + "name": "auxiliarySku", + "serializedName": "auxiliarySku", + "description": "Specifies whether the Auxiliary sku is enabled for the Network Interface\nresource.", + "type": { + "$ref": "278" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.auxiliarySku" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.properties" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.networkInterfaceConfigurations" + }, + { + "$id": "709", + "kind": "property", + "name": "networkApiVersion", + "serializedName": "networkApiVersion", + "description": "specifies the Microsoft.Network API version used when creating networking\nresources in the Network Interface Configurations for Virtual Machine Scale Set\nwith orchestration mode 'Flexible'", + "type": { + "$ref": "290" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.networkApiVersion" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.networkProfile" + }, + { + "$id": "710", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "description": "Specifies the Security related profile settings for the virtual machines in the\nscale set.", + "type": { + "$id": "711", + "kind": "model", + "name": "ComputeFleetSecurityProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the Security profile settings for the virtual machine or virtual\nmachine scale set.", + "decorators": [], + "properties": [ + { + "$id": "712", + "kind": "property", + "name": "uefiSettings", + "serializedName": "uefiSettings", + "description": "Specifies the security settings like secure boot and vTPM used while creating\nthe virtual machine. Minimum api-version: 2020-12-01.", + "type": { + "$id": "713", + "kind": "model", + "name": "ComputeFleetUefiSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the security settings like secure boot and vTPM used while creating\nthe virtual machine. Minimum api-version: 2020-12-01.", + "decorators": [], + "properties": [ + { + "$id": "714", + "kind": "property", + "name": "IsSecureBootEnabled", + "serializedName": "secureBootEnabled", + "description": "Specifies whether secure boot should be enabled on the virtual machine. Minimum\napi-version: 2020-12-01.", + "type": { + "$id": "715", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.secureBootEnabled" + }, + { + "$id": "716", + "kind": "property", + "name": "IsVTpmEnabled", + "serializedName": "vTpmEnabled", + "description": "Specifies whether vTPM should be enabled on the virtual machine. Minimum\napi-version: 2020-12-01.", + "type": { + "$id": "717", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.vTpmEnabled" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.uefiSettings" + }, + { + "$id": "718", + "kind": "property", + "name": "IsEncryptionAtHostEnabled", + "serializedName": "encryptionAtHost", + "description": "This property can be used by user in the request to enable or disable the Host\nEncryption for the virtual machine or virtual machine scale set. This will\nenable the encryption for all the disks including Resource/Temp disk at host\nitself. The default behavior is: The Encryption at host will be disabled unless\nthis property is set to true for the resource.", + "type": { + "$id": "719", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionAtHost" + }, + { + "$id": "720", + "kind": "property", + "name": "securityType", + "serializedName": "securityType", + "description": "Specifies the SecurityType of the virtual machine. It has to be set to any\nspecified value to enable UefiSettings. The default behavior is: UefiSettings\nwill not be enabled unless this property is set.", + "type": { + "$ref": "294" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.securityType" + }, + { + "$id": "721", + "kind": "property", + "name": "encryptionIdentity", + "serializedName": "encryptionIdentity", + "description": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "type": { + "$id": "722", + "kind": "model", + "name": "ComputeFleetEncryptionIdentity", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "decorators": [], + "properties": [ + { + "$id": "723", + "kind": "property", + "name": "userAssignedIdentityResourceId", + "serializedName": "userAssignedIdentityResourceId", + "description": "Specifies ARM Resource ID of one of the user identities associated with the VM.", + "type": { + "$id": "724", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity.userAssignedIdentityResourceId" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionIdentity" + }, + { + "$id": "726", + "kind": "property", + "name": "proxyAgentSettings", + "serializedName": "proxyAgentSettings", + "description": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "type": { + "$id": "727", + "kind": "model", + "name": "ComputeFleetProxyAgentSettings", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "decorators": [], + "properties": [ + { + "$id": "728", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "description": "Specifies whether ProxyAgent feature should be enabled on the virtual machine\nor virtual machine scale set.", + "type": { + "$id": "729", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.enabled" + }, + { + "$id": "730", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "description": "Specifies the mode that ProxyAgent will execute on if the feature is enabled.\nProxyAgent will start to audit or monitor but not enforce access control over\nrequests to host endpoints in Audit mode, while in Enforce mode it will enforce\naccess control. The default value is Enforce mode.", + "type": { + "$ref": "300" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.mode" + }, + { + "$id": "731", + "kind": "property", + "name": "keyIncarnationId", + "serializedName": "keyIncarnationId", + "description": "Increase the value of this property allows user to reset the key used for\nsecuring communication channel between guest and host.", + "type": { + "$id": "732", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.keyIncarnationId" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.proxyAgentSettings" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.securityProfile" + }, + { + "$id": "733", + "kind": "property", + "name": "diagnosticsProfile", + "serializedName": "diagnosticsProfile", + "description": "Specifies the boot diagnostic settings state.", + "type": { + "$id": "734", + "kind": "model", + "name": "ComputeFleetDiagnosticsProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.", + "decorators": [], + "properties": [ + { + "$id": "735", + "kind": "property", + "name": "bootDiagnostics", + "serializedName": "bootDiagnostics", + "description": "Boot Diagnostics is a debugging feature which allows you to view Console Output\nand Screenshot to diagnose VM status. **NOTE**: If storageUri is being\nspecified then ensure that the storage account is in the same region and\nsubscription as the VM. You can easily view the output of your console log.\nAzure also enables you to see a screenshot of the VM from the hypervisor.", + "type": { + "$id": "736", + "kind": "model", + "name": "ComputeFleetBootDiagnostics", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Boot Diagnostics is a debugging feature which allows you to view Console Output\nand Screenshot to diagnose VM status. You can easily view the output of your\nconsole log. Azure also enables you to see a screenshot of the VM from the\nhypervisor.", + "decorators": [], + "properties": [ + { + "$id": "737", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "description": "Whether boot diagnostics should be enabled on the Virtual Machine.", + "type": { + "$id": "738", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.enabled" + }, + { + "$id": "739", + "kind": "property", + "name": "storageUri", + "serializedName": "storageUri", + "description": "Uri of the storage account to use for placing the console output and\nscreenshot. If storageUri is not specified while enabling boot diagnostics,\nmanaged storage will be used.", + "type": { + "$id": "740", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.storageUri" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile.bootDiagnostics" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.diagnosticsProfile" + }, + { + "$id": "741", + "kind": "property", + "name": "extensionProfile", + "serializedName": "extensionProfile", + "description": "Specifies a collection of settings for extensions installed on virtual machines\nin the scale set.", + "type": { + "$id": "742", + "kind": "model", + "name": "ComputeFleetVmssExtensionProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a virtual machine scale set extension profile.", + "decorators": [], + "properties": [ + { + "$id": "743", + "kind": "property", + "name": "extensions", + "serializedName": "extensions", + "description": "The virtual machine scale set child extension resources.", + "type": { + "$id": "744", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetExtension", + "valueType": { + "$id": "745", + "kind": "model", + "name": "ComputeFleetVmssExtension", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "746", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Resource Id", + "type": { + "$id": "747", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.id" + }, + { + "$id": "749", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the extension.", + "type": { + "$id": "750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.name" + }, + { + "$id": "751", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "description": "Resource type", + "type": { + "$id": "752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.type" + }, + { + "$id": "753", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "754", + "kind": "model", + "name": "ComputeFleetVmssExtensionProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "755", + "kind": "property", + "name": "forceUpdateTag", + "serializedName": "forceUpdateTag", + "description": "If a value is provided and is different from the previous value, the extension\nhandler will be forced to update even if the extension configuration has not\nchanged.", + "type": { + "$id": "756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.forceUpdateTag" + }, + { + "$id": "757", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The name of the extension handler publisher.", + "type": { + "$id": "758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.publisher" + }, + { + "$id": "759", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.type" + }, + { + "$id": "761", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "description": "Specifies the version of the script handler.", + "type": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.typeHandlerVersion" + }, + { + "$id": "763", + "kind": "property", + "name": "ShouldAutoUpgradeMinorVersion", + "serializedName": "autoUpgradeMinorVersion", + "description": "Indicates whether the extension should use a newer minor version if one is\navailable at deployment time. Once deployed, however, the extension will not\nupgrade minor versions unless redeployed, even with this property set to true.", + "type": { + "$id": "764", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.autoUpgradeMinorVersion" + }, + { + "$id": "765", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "description": "Indicates whether the extension should be automatically upgraded by the\nplatform if there is a newer version of the extension available.", + "type": { + "$id": "766", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.enableAutomaticUpgrade" + }, + { + "$id": "767", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "description": "Json formatted public settings for the extension.", + "type": { + "$id": "768", + "kind": "dict", + "keyType": { + "$id": "769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "770", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.settings" + }, + { + "$id": "771", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "description": "The extension can contain either protectedSettings or\nprotectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "772", + "kind": "dict", + "keyType": { + "$id": "773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "774", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettings" + }, + { + "$id": "775", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "description": "The provisioning state, which only appears in the response.", + "type": { + "$id": "776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisioningState" + }, + { + "$id": "777", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "description": "Collection of extension names after which this extension needs to be\nprovisioned.", + "type": { + "$id": "778", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisionAfterExtensions" + }, + { + "$id": "780", + "kind": "property", + "name": "IsSuppressFailuresEnabled", + "serializedName": "suppressFailures", + "description": "Indicates whether failures stemming from the extension will be suppressed\n(Operational failures such as not connecting to the VM will not be suppressed\nregardless of this value). The default is false.", + "type": { + "$id": "781", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.suppressFailures" + }, + { + "$id": "782", + "kind": "property", + "name": "protectedSettingsFromKeyVault", + "serializedName": "protectedSettingsFromKeyVault", + "description": "The extensions protected settings that are passed by reference, and consumed\nfrom key vault", + "type": { + "$id": "783", + "kind": "model", + "name": "ComputeFleetKeyVaultSecretReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Describes a reference to Key Vault Secret", + "decorators": [], + "properties": [ + { + "$id": "784", + "kind": "property", + "name": "secretUrl", + "serializedName": "secretUrl", + "description": "The URL referencing a secret in a Key Vault.", + "type": { + "$id": "785", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.secretUrl" + }, + { + "$id": "786", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "description": "The relative URL of the Key Vault containing the secret.", + "type": { + "$ref": "539" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.sourceVault" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.properties" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile.extensions" + }, + { + "$id": "787", + "kind": "property", + "name": "extensionsTimeBudget", + "serializedName": "extensionsTimeBudget", + "description": "Specifies the time alloted for all extensions to start. The time duration\nshould be between 15 minutes and 120 minutes (inclusive) and should be\nspecified in ISO 8601 format. The default value is 90 minutes (PT1H30M).\nMinimum api-version: 2020-06-01.", + "type": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile.extensionsTimeBudget" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.extensionProfile" + }, + { + "$id": "789", + "kind": "property", + "name": "licenseType", + "serializedName": "licenseType", + "description": "Specifies that the image or disk that is being used was licensed on-premises.\n

Possible values for Windows Server operating system are:

\nWindows_Client

Windows_Server

Possible values for Linux\nServer operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS\n(for SUSE)

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

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

Minimum api-version: 2015-06-15", + "type": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.licenseType" + }, + { + "$id": "791", + "kind": "property", + "name": "scheduledEventsProfile", + "serializedName": "scheduledEventsProfile", + "description": "Specifies Scheduled Event related configurations.", + "type": { + "$id": "792", + "kind": "model", + "name": "ComputeFleetScheduledEventsProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "793", + "kind": "property", + "name": "terminateNotificationProfile", + "serializedName": "terminateNotificationProfile", + "description": "Specifies Terminate Scheduled Event related configurations.", + "type": { + "$id": "794", + "kind": "model", + "name": "ComputeFleetTerminateNotificationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies Terminate Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "795", + "kind": "property", + "name": "notBeforeTimeout", + "serializedName": "notBeforeTimeout", + "description": "Configurable length of time a Virtual Machine being deleted will have to\npotentially approve the Terminate Scheduled Event before the event is auto\napproved (timed out). The configuration must be specified in ISO 8601 format,\nthe default value is 5 minutes (PT5M)", + "type": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.notBeforeTimeout" + }, + { + "$id": "797", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "description": "Specifies whether the Terminate Scheduled event is enabled or disabled.", + "type": { + "$id": "798", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.enable" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile.terminateNotificationProfile" + }, + { + "$id": "799", + "kind": "property", + "name": "osImageNotificationProfile", + "serializedName": "osImageNotificationProfile", + "description": "Specifies OS Image Scheduled Event related configurations.", + "type": { + "$id": "800", + "kind": "model", + "name": "ComputeFleetOSImageNotificationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies OS Image Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "801", + "kind": "property", + "name": "notBeforeTimeout", + "serializedName": "notBeforeTimeout", + "description": "Length of time a Virtual Machine being reimaged or having its OS upgraded will\nhave to potentially approve the OS Image Scheduled Event before the event is\nauto approved (timed out). The configuration is specified in ISO 8601 format,\nand the value must not exceed 15 minutes (PT15M)", + "type": { + "$id": "802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.notBeforeTimeout" + }, + { + "$id": "803", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "description": "Specifies whether the OS Image Scheduled event is enabled or disabled.", + "type": { + "$id": "804", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.enable" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile.osImageNotificationProfile" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.scheduledEventsProfile" + }, + { + "$id": "805", + "kind": "property", + "name": "userData", + "serializedName": "userData", + "description": "UserData for the virtual machines in the scale set, which must be base-64\nencoded. Customer should not pass any secrets in here. Minimum api-version:\n2021-03-01.", + "type": { + "$id": "806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.userData" + }, + { + "$id": "807", + "kind": "property", + "name": "capacityReservation", + "serializedName": "capacityReservation", + "description": "Specifies the capacity reservation related details of a scale set. Minimum\napi-version: 2021-04-01.", + "type": { + "$id": "808", + "kind": "model", + "name": "CapacityReservationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "The parameters of a capacity reservation Profile.", + "decorators": [], + "properties": [ + { + "$id": "809", + "kind": "property", + "name": "capacityReservationGroup", + "serializedName": "capacityReservationGroup", + "description": "Specifies the capacity reservation group resource id that should be used for\nallocating the virtual machine or scaleset vm instances provided enough\ncapacity has been reserved. Please refer to https://aka.ms/CapacityReservation\nfor more details.", + "type": { + "$ref": "539" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile.capacityReservationGroup" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.capacityReservation" + }, + { + "$id": "810", + "kind": "property", + "name": "applicationProfile", + "serializedName": "applicationProfile", + "description": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "811", + "kind": "model", + "name": "ComputeFleetApplicationProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Contains the list of gallery applications that should be made available to the\nVM/VMSS", + "decorators": [], + "properties": [ + { + "$id": "812", + "kind": "property", + "name": "galleryApplications", + "serializedName": "galleryApplications", + "description": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "813", + "kind": "array", + "name": "ArrayVmGalleryApplication", + "valueType": { + "$id": "814", + "kind": "model", + "name": "ComputeFleetVMGalleryApplication", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the required information to reference a compute gallery application\nversion", + "decorators": [], + "properties": [ + { + "$id": "815", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "Optional, Specifies a passthrough value for more generic context.", + "type": { + "$id": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.tags" + }, + { + "$id": "817", + "kind": "property", + "name": "order", + "serializedName": "order", + "description": "Optional, Specifies the order in which the packages have to be installed", + "type": { + "$id": "818", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.order" + }, + { + "$id": "819", + "kind": "property", + "name": "packageReferenceId", + "serializedName": "packageReferenceId", + "description": "Specifies the GalleryApplicationVersion resource id on the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}", + "type": { + "$id": "820", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.packageReferenceId" + }, + { + "$id": "822", + "kind": "property", + "name": "configurationReference", + "serializedName": "configurationReference", + "description": "Optional, Specifies the uri to an azure blob that will replace the default\nconfiguration for the package if provided", + "type": { + "$id": "823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.configurationReference" + }, + { + "$id": "824", + "kind": "property", + "name": "IsTreatFailureAsDeploymentFailureEnabled", + "serializedName": "treatFailureAsDeploymentFailure", + "description": "Optional, If true, any failure for any operation in the VmApplication will fail\nthe deployment", + "type": { + "$id": "825", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.treatFailureAsDeploymentFailure" + }, + { + "$id": "826", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "description": "If set to true, when a new Gallery Application version is available in PIR/SIG,\nit will be automatically updated for the VM/VMSS", + "type": { + "$id": "827", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.enableAutomaticUpgrade" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile.galleryApplications" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.applicationProfile" + }, + { + "$id": "828", + "kind": "property", + "name": "hardwareProfile", + "serializedName": "hardwareProfile", + "description": "Specifies the hardware profile related details of a scale set. Minimum\napi-version: 2021-11-01.", + "type": { + "$id": "829", + "kind": "model", + "name": "ComputeFleetVmssHardwareProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the hardware settings for the virtual machine scale set.", + "decorators": [], + "properties": [ + { + "$id": "830", + "kind": "property", + "name": "vmSizeProperties", + "serializedName": "vmSizeProperties", + "description": "Specifies the properties for customizing the size of the virtual machine.\nMinimum api-version: 2021-11-01. Please follow the instructions in [VM\nCustomization](https://aka.ms/vmcustomization) for more details.", + "type": { + "$id": "831", + "kind": "model", + "name": "ComputeFleetVMSizeProperties", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies VM Size Property settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "832", + "kind": "property", + "name": "vCPUsAvailable", + "serializedName": "vCPUsAvailable", + "description": "Specifies the number of vCPUs available for the VM. When this property is not\nspecified in the request body the default behavior is to set it to the value of\nvCPUs available for that VM size exposed in api response of [List all available\nvirtual machine sizes in a\nregion](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).", + "type": { + "$id": "833", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsAvailable" + }, + { + "$id": "834", + "kind": "property", + "name": "vCPUsPerCore", + "serializedName": "vCPUsPerCore", + "description": "Specifies the vCPU to physical core ratio. When this property is not specified\nin the request body the default behavior is set to the value of vCPUsPerCore\nfor the VM Size exposed in api response of [List all available virtual machine\nsizes in a\nregion](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).\n**Setting this property to 1 also means that hyper-threading is disabled.**", + "type": { + "$id": "835", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsPerCore" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile.vmSizeProperties" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.hardwareProfile" + }, + { + "$id": "836", + "kind": "property", + "name": "serviceArtifactReference", + "serializedName": "serviceArtifactReference", + "description": "Specifies the service artifact reference id used to set same image version for\nall virtual machines in the scale set when using 'latest' image version.\nMinimum api-version: 2022-11-01", + "type": { + "$id": "837", + "kind": "model", + "name": "ServiceArtifactReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the service artifact reference id used to set same image version for\nall virtual machines in the scale set when using 'latest' image version.\nMinimum api-version: 2022-11-01", + "decorators": [], + "properties": [ + { + "$id": "838", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The service artifact reference id in the form of\n/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}", + "type": { + "$id": "839", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference.id" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.serviceArtifactReference" + }, + { + "$id": "841", + "kind": "property", + "name": "securityPostureReference", + "serializedName": "securityPostureReference", + "description": "Specifies the security posture to be used for all virtual machines in the scale\nset. Minimum api-version: 2023-03-01", + "type": { + "$id": "842", + "kind": "model", + "name": "ComputeFleetSecurityPostureReference", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Specifies the security posture to be used for all virtual machines in the scale\nset. Minimum api-version: 2023-03-01", + "decorators": [], + "properties": [ + { + "$id": "843", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The security posture reference id in the form of\n/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + "type": { + "$id": "844", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.id" + }, + { + "$id": "845", + "kind": "property", + "name": "excludeExtensions", + "serializedName": "excludeExtensions", + "description": "List of virtual machine extension names to exclude when applying the security\nposture.", + "type": { + "$id": "846", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.excludeExtensions" + }, + { + "$id": "848", + "kind": "property", + "name": "isOverridable", + "serializedName": "isOverridable", + "description": "Whether the security posture can be overridden by the user.", + "type": { + "$id": "849", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.isOverridable" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.securityPostureReference" + }, + { + "$id": "850", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "description": "Specifies the time in which this VM profile for the Virtual Machine Scale Set\nwas created. Minimum API version for this property is 2023-09-01. This value\nwill be added to VMSS Flex VM tags when creating/updating the VMSS VM Profile\nwith minimum api-version 2023-09-01. Examples: \"2024-07-01T00:00:01.1234567+00:00\"", + "type": { + "$id": "851", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.timeCreated" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.virtualMachineProfileOverride" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile.locationProfiles" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.additionalLocationsProfile" + }, + { + "$id": "853", + "kind": "property", + "name": "computeProfile", + "serializedName": "computeProfile", + "description": "Compute Profile to use for running user's workloads.", + "type": { + "$id": "854", + "kind": "model", + "name": "ComputeFleetComputeProfile", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Compute Profile to use for running user's workloads.", + "decorators": [], + "properties": [ + { + "$id": "855", + "kind": "property", + "name": "baseVirtualMachineProfile", + "serializedName": "baseVirtualMachineProfile", + "description": "Base Virtual Machine Profile Properties to be specified according to \"specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile\"", + "type": { + "$ref": "459" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.baseVirtualMachineProfile" + }, + { + "$id": "856", + "kind": "property", + "name": "computeApiVersion", + "serializedName": "computeApiVersion", + "description": "Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and Virtual Machines.\nThe default value will be the latest supported computeApiVersion by Compute Fleet.", + "type": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.computeApiVersion" + }, + { + "$id": "858", + "kind": "property", + "name": "platformFaultDomainCount", + "serializedName": "platformFaultDomainCount", + "description": "Specifies the number of fault domains to use when creating the underlying VMSS.\nA fault domain is a logical group of hardware within an Azure datacenter.\nVMs in the same fault domain share a common power source and network switch.\nIf not specified, defaults to 1, which represents \"Max Spreading\" (using as many fault domains as possible).\nThis property cannot be updated.", + "type": { + "$id": "859", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.platformFaultDomainCount" + }, + { + "$id": "860", + "kind": "property", + "name": "additionalVirtualMachineCapabilities", + "serializedName": "additionalVirtualMachineCapabilities", + "description": "Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled.\nultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs.\nhibernationEnabled: Enables the hibernation capability on the VMSS VMs.\nDefault value is null if not specified. This property cannot be updated once set.", + "type": { + "$id": "861", + "kind": "model", + "name": "AdditionalCapabilities", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "AdditionalCapabilities for VM.", + "decorators": [], + "properties": [ + { + "$id": "862", + "kind": "property", + "name": "isUltraSSDEnabled", + "serializedName": "ultraSSDEnabled", + "description": "The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS.\nManaged disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.", + "type": { + "$id": "863", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.ultraSSDEnabled" + }, + { + "$id": "864", + "kind": "property", + "name": "isHibernationEnabled", + "serializedName": "hibernationEnabled", + "description": "The flag that enables or disables hibernation capability on the VM.", + "type": { + "$id": "865", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.hibernationEnabled" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.additionalVirtualMachineCapabilities" + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.computeProfile" + }, + { + "$id": "866", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "description": "Specifies the time at which the Compute Fleet is created.", + "type": { + "$id": "867", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "868", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.timeCreated" + }, + { + "$id": "869", + "kind": "property", + "name": "uniqueId", + "serializedName": "uniqueId", + "description": "Specifies the ID which uniquely identifies a Compute Fleet.", + "type": { + "$id": "870", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.uniqueId" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.properties" + }, + { + "$id": "871", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "description": "Zones in which the Compute Fleet is available", + "type": { + "$id": "872", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.zones" + }, + { + "$id": "874", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "description": "The managed service identities assigned to this resource.", + "type": { + "$id": "875", + "kind": "model", + "name": "ManagedServiceIdentity", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "876", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "877", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId" + }, + { + "$id": "879", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "880", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId" + }, + { + "$id": "882", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "306" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type" + }, + { + "$id": "883", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "description": "The identities assigned to this resource by the user.", + "type": { + "$id": "884", + "kind": "dict", + "keyType": { + "$id": "885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "886", + "kind": "nullable", + "type": { + "$id": "887", + "kind": "model", + "name": "UserAssignedIdentity", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "888", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "description": "The principal ID of the assigned identity.", + "type": { + "$id": "889", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId" + }, + { + "$id": "891", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "description": "The client ID of the assigned identity.", + "type": { + "$id": "892", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId" + } + ] + } + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.identity" + }, + { + "$id": "894", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "description": "Details of the resource plan.", + "type": { + "$id": "895", + "kind": "model", + "name": "Plan", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "description": "Plan for the resource.", + "decorators": [], + "properties": [ + { + "$id": "896", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.name" + }, + { + "$id": "898", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.publisher" + }, + { + "$id": "900", + "kind": "property", + "name": "product", + "serializedName": "product", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.", + "type": { + "$id": "901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.product" + }, + { + "$id": "902", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.promotionCode" + }, + { + "$id": "904", + "kind": "property", + "name": "version", + "serializedName": "version", + "description": "The version of the desired product/artifact.", + "type": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.version" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.plan" + } + ] + }, + { + "$ref": "382" + }, + { + "$ref": "385" + }, + { + "$ref": "397" + }, + { + "$ref": "405" + }, + { + "$ref": "411" + }, + { + "$ref": "413" + }, + { + "$ref": "419" + }, + { + "$ref": "451" + }, + { + "$ref": "454" + }, + { + "$ref": "459" + }, + { + "$ref": "461" + }, + { + "$ref": "471" + }, + { + "$ref": "480" + }, + { + "$ref": "489" + }, + { + "$ref": "495" + }, + { + "$ref": "500" + }, + { + "$ref": "503" + }, + { + "$ref": "510" + }, + { + "$ref": "514" + }, + { + "$ref": "517" + }, + { + "$ref": "525" + }, + { + "$ref": "529" + }, + { + "$ref": "537" + }, + { + "$ref": "539" + }, + { + "$ref": "545" + }, + { + "$ref": "555" + }, + { + "$ref": "557" + }, + { + "$ref": "576" + }, + { + "$ref": "584" + }, + { + "$ref": "591" + }, + { + "$ref": "598" + }, + { + "$ref": "601" + }, + { + "$ref": "606" + }, + { + "$ref": "612" + }, + { + "$ref": "631" + }, + { + "$ref": "633" + }, + { + "$ref": "639" + }, + { + "$ref": "643" + }, + { + "$ref": "654" + }, + { + "$ref": "660" + }, + { + "$ref": "664" + }, + { + "$ref": "669" + }, + { + "$ref": "673" + }, + { + "$ref": "677" + }, + { + "$ref": "683" + }, + { + "$ref": "692" + }, + { + "$ref": "711" + }, + { + "$ref": "713" + }, + { + "$ref": "722" + }, + { + "$ref": "727" + }, + { + "$ref": "734" + }, + { + "$ref": "736" + }, + { + "$ref": "742" + }, + { + "$ref": "745" + }, + { + "$ref": "754" + }, + { + "$ref": "783" + }, + { + "$ref": "792" + }, + { + "$ref": "794" + }, + { + "$ref": "800" + }, + { + "$ref": "808" + }, + { + "$ref": "811" + }, + { + "$ref": "814" + }, + { + "$ref": "829" + }, + { + "$ref": "831" + }, + { + "$ref": "837" + }, + { + "$ref": "842" + }, + { + "$ref": "854" + }, + { + "$ref": "861" + }, + { + "$ref": "875" + }, + { + "$ref": "887" + }, + { + "$ref": "895" + }, + { + "$ref": "351" + }, + { + "$ref": "352" + }, + { + "$ref": "362" + }, + { + "$id": "906", + "kind": "model", + "name": "ErrorResponse", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "907", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "The error object.", + "type": { + "$id": "908", + "kind": "model", + "name": "ErrorDetail", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "description": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "909", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "The error code.", + "type": { + "$id": "910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code" + }, + { + "$id": "911", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "The error message.", + "type": { + "$id": "912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message" + }, + { + "$id": "913", + "kind": "property", + "name": "target", + "serializedName": "target", + "description": "The error target.", + "type": { + "$id": "914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target" + }, + { + "$id": "915", + "kind": "property", + "name": "details", + "serializedName": "details", + "description": "The error details.", + "type": { + "$id": "916", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "908" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details" + }, + { + "$id": "917", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "description": "The error additional info.", + "type": { + "$id": "918", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "919", + "kind": "model", + "name": "ErrorAdditionalInfo", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "description": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "920", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The additional info type.", + "type": { + "$id": "921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type" + }, + { + "$id": "922", + "kind": "property", + "name": "info", + "serializedName": "info", + "description": "The additional info.", + "type": { + "$id": "923", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "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" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error" + } + ] + }, + { + "$ref": "908" + }, + { + "$ref": "919" + }, + { + "$ref": "923" + }, + { + "$id": "924", + "kind": "model", + "name": "FleetUpdate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate", + "usage": "Input,Json", + "description": "Fleet Update Model", + "decorators": [], + "properties": [ + { + "$id": "925", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "description": "Resource tags.", + "type": { + "$id": "926", + "kind": "dict", + "keyType": { + "$id": "927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.tags" + }, + { + "$id": "929", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "description": "Updatable managed service identity", + "type": { + "$id": "930", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "description": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "931", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "306" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.type" + }, + { + "$id": "932", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "description": "The identities assigned to this resource by the user.", + "type": { + "$id": "933", + "kind": "dict", + "keyType": { + "$id": "934", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "886" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.userAssignedIdentities" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.identity" + }, + { + "$id": "935", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "description": "Updatable resource plan", + "type": { + "$id": "936", + "kind": "model", + "name": "ResourcePlanUpdate", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate", + "usage": "Input,Json", + "description": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "937", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.name" + }, + { + "$id": "939", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.publisher" + }, + { + "$id": "941", + "kind": "property", + "name": "product", + "serializedName": "product", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.", + "type": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.product" + }, + { + "$id": "943", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.promotionCode" + }, + { + "$id": "945", + "kind": "property", + "name": "version", + "serializedName": "version", + "description": "The version of the desired product/artifact.", + "type": { + "$id": "946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.version" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.plan" + }, + { + "$id": "947", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "RP-specific updatable properties", + "type": { + "$ref": "382" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.properties" + } + ] + }, + { + "$ref": "930" + }, + { + "$ref": "936" + }, + { + "$id": "948", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "description": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "949", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The operation status", + "type": { + "$ref": "326" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status" + }, + { + "$id": "950", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the operationStatus resource", + "type": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name" + }, + { + "$id": "952", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "description": "Operation start time", + "type": { + "$id": "953", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "954", + "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" + }, + { + "$id": "955", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "description": "Operation complete time", + "type": { + "$id": "956", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "957", + "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" + }, + { + "$id": "958", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "description": "The progress made toward completing the operation", + "type": { + "$id": "959", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete" + }, + { + "$id": "960", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "908" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error" + } + ] + }, + { + "$id": "961", + "kind": "model", + "name": "FleetListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "description": "The response of a Fleet list operation.", + "decorators": [], + "properties": [ + { + "$id": "962", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The Fleet items on this page", + "type": { + "$id": "963", + "kind": "array", + "name": "ArrayFleet", + "valueType": { + "$ref": "350" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value" + }, + { + "$id": "964", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "965", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "966", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink" + } + ] + }, + { + "$id": "967", + "kind": "model", + "name": "VirtualMachineScaleSetListResult", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult", + "usage": "Output,Json", + "description": "The response of a VirtualMachineScaleSet list operation.", + "decorators": [], + "properties": [ + { + "$id": "968", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The VirtualMachineScaleSet items on this page", + "type": { + "$id": "969", + "kind": "array", + "name": "ArrayVirtualMachineScaleSet", + "valueType": { + "$id": "970", + "kind": "model", + "name": "ComputeFleetVmss", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet", + "usage": "Output,Json", + "description": "An AzureFleet's virtualMachineScaleSet", + "decorators": [], + "properties": [ + { + "$id": "971", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "The compute RP resource id of the virtualMachineScaleSet \n\"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}\"", + "type": { + "$id": "972", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.id" + }, + { + "$id": "974", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Type of the virtualMachineScaleSet", + "type": { + "$id": "975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.type" + }, + { + "$id": "976", + "kind": "property", + "name": "operationStatus", + "serializedName": "operationStatus", + "description": "This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.operationStatus" + }, + { + "$id": "977", + "kind": "property", + "name": "error", + "serializedName": "error", + "description": "Error Information when `operationStatus` is `Failed`", + "type": { + "$id": "978", + "kind": "model", + "name": "ComputeFleetApiError", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError", + "usage": "Output,Json", + "description": "ApiError for Fleet", + "decorators": [], + "properties": [ + { + "$id": "979", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "The error code.", + "type": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.code" + }, + { + "$id": "981", + "kind": "property", + "name": "target", + "serializedName": "target", + "description": "The target of the particular error.", + "type": { + "$id": "982", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.target" + }, + { + "$id": "983", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "The error message.", + "type": { + "$id": "984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.message" + }, + { + "$id": "985", + "kind": "property", + "name": "details", + "serializedName": "details", + "description": "The API error details", + "type": { + "$id": "986", + "kind": "array", + "name": "ArrayApiErrorBase", + "valueType": { + "$id": "987", + "kind": "model", + "name": "ComputeFleetApiErrorInfo", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase", + "usage": "Output,Json", + "description": "API error base.", + "decorators": [], + "properties": [ + { + "$id": "988", + "kind": "property", + "name": "code", + "serializedName": "code", + "description": "The error code.", + "type": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.code" + }, + { + "$id": "990", + "kind": "property", + "name": "target", + "serializedName": "target", + "description": "The target of the particular error.", + "type": { + "$id": "991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.target" + }, + { + "$id": "992", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "The error message.", + "type": { + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.message" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.details" + }, + { + "$id": "994", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "description": "The API inner error", + "type": { + "$id": "995", + "kind": "model", + "name": "ComputeFleetInnerError", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError", + "usage": "Output,Json", + "description": "Inner error details.", + "decorators": [], + "properties": [ + { + "$id": "996", + "kind": "property", + "name": "exceptionType", + "serializedName": "exceptionType", + "description": "The exception type.", + "type": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.exceptionType" + }, + { + "$id": "998", + "kind": "property", + "name": "errorDetail", + "serializedName": "errorDetail", + "description": "The internal error message or exception dump.", + "type": { + "$id": "999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.errorDetail" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.innererror" + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.error" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.value" + }, + { + "$id": "1000", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "1001", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.nextLink" + } + ] + }, + { + "$ref": "970" + }, + { + "$ref": "978" + }, + { + "$ref": "987" + }, + { + "$ref": "995" + }, + { + "$id": "1002", + "kind": "model", + "name": "OperationListResult", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "description": "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": "1003", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The Operation items on this page", + "type": { + "$id": "1004", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "1005", + "kind": "model", + "name": "Operation", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "description": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "1006", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "1007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name" + }, + { + "$id": "1008", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "description": "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": "1009", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction" + }, + { + "$id": "1010", + "kind": "property", + "name": "display", + "serializedName": "display", + "description": "Localized display information for this particular operation.", + "type": { + "$id": "1011", + "kind": "model", + "name": "OperationDisplay", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "description": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "1012", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider" + }, + { + "$id": "1014", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "1015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource" + }, + { + "$id": "1016", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation" + }, + { + "$id": "1018", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "1019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display" + }, + { + "$id": "1020", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "334" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin" + }, + { + "$id": "1021", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "description": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "342" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value" + }, + { + "$id": "1022", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "1023", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1024", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink" + } + ] + }, + { + "$ref": "1005" + }, + { + "$ref": "1011" + } + ], + "Clients": [ + { + "$id": "1025", + "Name": "AzureFleetClient", + "Operations": [], + "Protocol": { + "$id": "1026" + }, + "Parameters": [ + { + "$id": "1027", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "1028", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1029", + "Type": { + "$id": "1030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "1031", + "Name": "Operations", + "Operations": [ + { + "$id": "1032", + "Name": "list", + "ResourceName": "Operations", + "Description": "List the operations for the provider", + "Accessibility": "internal", + "Parameters": [ + { + "$id": "1033", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1035", + "Type": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1037", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1038", + "kind": "constant", + "valueType": { + "$id": "1039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1040", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1002" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.AzureFleet/operations", + "BufferResponse": true, + "Paging": { + "$id": "1041", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "1042", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-11-01/Operations_List.json", + "parameters": [ + { + "$id": "1043", + "parameter": { + "$ref": "1033" + }, + "value": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "1034" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "1045", + "response": { + "$ref": "1040" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1046", + "kind": "model", + "type": { + "$ref": "1002" + }, + "value": { + "$id": "1047", + "value": { + "$id": "1048", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "1049", + "kind": "model", + "type": { + "$ref": "1005" + }, + "value": { + "$id": "1050", + "origin": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "1007" + }, + "value": "Microsoft.AzureFleet/fleets/read" + }, + "isDataAction": { + "$id": "1053", + "kind": "boolean", + "type": { + "$ref": "1009" + }, + "value": false + }, + "display": { + "$id": "1054", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "1055", + "provider": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "1015" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "Get Azure Fleet" + }, + "description": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "1019" + }, + "value": "Get properties of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1060", + "kind": "model", + "type": { + "$ref": "1005" + }, + "value": { + "$id": "1061", + "origin": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "1007" + }, + "value": "Microsoft.AzureFleet/fleets/write" + }, + "isDataAction": { + "$id": "1064", + "kind": "boolean", + "type": { + "$ref": "1009" + }, + "value": false + }, + "display": { + "$id": "1065", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "1066", + "provider": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "1015" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "Create or Update Azure Fleet" + }, + "description": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "1019" + }, + "value": "Creates a new Azure Fleet resource or updates an existing one" + } + } + } + } + }, + { + "$id": "1071", + "kind": "model", + "type": { + "$ref": "1005" + }, + "value": { + "$id": "1072", + "origin": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "1007" + }, + "value": "Microsoft.AzureFleet/fleets/delete" + }, + "isDataAction": { + "$id": "1075", + "kind": "boolean", + "type": { + "$ref": "1009" + }, + "value": false + }, + "display": { + "$id": "1076", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "1077", + "provider": { + "$id": "1078", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1079", + "kind": "string", + "type": { + "$ref": "1015" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1080", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "Delete Virtual Machine and Virtual Machine scale sets in a Azure Fleet resource" + }, + "description": { + "$id": "1081", + "kind": "string", + "type": { + "$ref": "1019" + }, + "value": "Deletes all compute resources of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1082", + "kind": "model", + "type": { + "$ref": "1005" + }, + "value": { + "$id": "1083", + "origin": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1085", + "kind": "string", + "type": { + "$ref": "1007" + }, + "value": "Microsoft.AzureFleet/register/action" + }, + "isDataAction": { + "$id": "1086", + "kind": "boolean", + "type": { + "$ref": "1009" + }, + "value": false + }, + "display": { + "$id": "1087", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "1088", + "provider": { + "$id": "1089", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "1015" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1091", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "Register subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1092", + "kind": "string", + "type": { + "$ref": "1019" + }, + "value": "Registers Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + }, + { + "$id": "1093", + "kind": "model", + "type": { + "$ref": "1005" + }, + "value": { + "$id": "1094", + "origin": { + "$id": "1095", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1096", + "kind": "string", + "type": { + "$ref": "1007" + }, + "value": "Microsoft.AzureFleet/unregister/action" + }, + "isDataAction": { + "$id": "1097", + "kind": "boolean", + "type": { + "$ref": "1009" + }, + "value": false + }, + "display": { + "$id": "1098", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "1099", + "provider": { + "$id": "1100", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1101", + "kind": "string", + "type": { + "$ref": "1015" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1102", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "Unregister Subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "1019" + }, + "value": "Unregisters Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1104" + }, + "Parent": "AzureFleetClient", + "Parameters": [ + { + "$id": "1105", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "1106", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1107", + "Type": { + "$id": "1108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + }, + { + "$id": "1109", + "Name": "Fleets", + "Operations": [ + { + "$id": "1110", + "Name": "get", + "ResourceName": "Fleet", + "Description": "Get a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1111", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1113", + "Type": { + "$id": "1114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1115", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1116", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1118", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1120", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "1121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1122", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1123", + "kind": "constant", + "valueType": { + "$id": "1124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1125", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.get", + "Decorators": [], + "Examples": [ + { + "$id": "1126", + "kind": "http", + "name": "Fleets_Get", + "description": "Fleets_Get", + "filePath": "2024-11-01/Fleets_Get.json", + "parameters": [ + { + "$id": "1127", + "parameter": { + "$ref": "1111" + }, + "value": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "1112" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1129", + "parameter": { + "$ref": "1115" + }, + "value": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "1116" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1131", + "parameter": { + "$ref": "1118" + }, + "value": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "1119" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1133", + "parameter": { + "$ref": "1120" + }, + "value": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "1121" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "1135", + "response": { + "$ref": "1125" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1136", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "1137", + "properties": { + "$id": "1138", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "1139", + "provisioningState": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "1141", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "1142", + "capacity": { + "$id": "1143", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1144", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1145", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1148", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1149", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "1150", + "capacity": { + "$id": "1151", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1152", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1154", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "1155", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "1156", + "name": { + "$id": "1157", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1158", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1159", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "1160", + "baseVirtualMachineProfile": { + "$id": "1161", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "1162", + "osProfile": { + "$id": "1163", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1164", + "computerNamePrefix": { + "$id": "1165", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1166", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1167", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1168", + "provisionVMAgent": { + "$id": "1169", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1170", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1172", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "1173", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "1174", + "passName": { + "$id": "1175", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1177", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1178", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "1179", + "patchMode": { + "$id": "1180", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1181", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1183", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "1184", + "rebootSetting": { + "$id": "1185", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1186", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1187", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1188", + "listeners": { + "$id": "1189", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "1190", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "1191", + "protocol": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "1193", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1194", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1195", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1196", + "disablePasswordAuthentication": { + "$id": "1197", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "1198", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "1199", + "publicKeys": { + "$id": "1200", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "1201", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "1202", + "path": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1205", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "1206", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "1207", + "patchMode": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1209", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1210", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "1211", + "rebootSetting": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1213", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1214", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1215", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "1216", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "1217", + "sourceVault": { + "$id": "1218", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1219", + "id": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1221", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "1222", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "1223", + "certificateUrl": { + "$id": "1224", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1225", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1226", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1227", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1228", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "1229", + "imageReference": { + "$id": "1230", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "1231", + "publisher": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1233", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1240", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "1241", + "name": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1244", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "1245", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1246", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "1247", + "option": { + "$id": "1248", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "1249", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1250", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "1251", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "1252", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "1253", + "uri": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1255", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "1256", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1257", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "1258", + "storageAccountType": { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1260", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1261", + "id": { + "$id": "1262", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1263", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "1264", + "securityEncryptionType": { + "$id": "1265", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1266", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1267", + "id": { + "$id": "1268", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1270", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "1271", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "1272", + "name": { + "$id": "1273", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1274", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "1275", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1276", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "1277", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1278", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1279", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "1280", + "storageAccountType": { + "$id": "1281", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1282", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1283", + "id": { + "$id": "1284", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1285", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "1286", + "securityEncryptionType": { + "$id": "1287", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1288", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1289", + "id": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1291", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1292", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "1294", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "1295", + "healthProbe": { + "$id": "1296", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "1297", + "id": { + "$id": "1298", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1299", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "1300", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "1301", + "name": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "1303", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "1304", + "primary": { + "$id": "1305", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1306", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1307", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "1308", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1309", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1310", + "id": { + "$id": "1311", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1312", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "1313", + "dnsServers": { + "$id": "1314", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "1315", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "1316", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "1317", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "1318", + "name": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "1320", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "1321", + "subnet": { + "$id": "1322", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "1323", + "id": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "1325", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "1326", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "1327", + "name": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "1329", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "1330", + "idleTimeoutInMinutes": { + "$id": "1331", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "1332", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "1333", + "domainNameLabel": { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "1335", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "1336", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "1337", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "1338", + "ipTagType": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "1340", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "1341", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1342", + "id": { + "$id": "1343", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "1344", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "1345", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "1346", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "1347", + "name": { + "$id": "1348", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "1350", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "1351", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "1352", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1353", + "id": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "1355", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "1356", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1357", + "id": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "1359", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "1360", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1361", + "id": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "1363", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "1364", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1365", + "id": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "1367", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "1372", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "1373", + "uefiSettings": { + "$id": "1374", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "1375", + "secureBootEnabled": { + "$id": "1376", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "1377", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "1378", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "1379", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "1380", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "1381", + "userAssignedIdentityResourceId": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "1383", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "1384", + "enabled": { + "$id": "1385", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "1386", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "1387", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "1388", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "1389", + "bootDiagnostics": { + "$id": "1390", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "1391", + "enabled": { + "$id": "1392", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "1393", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "1394", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "1395", + "extensions": { + "$id": "1396", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "1397", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "1398", + "name": { + "$id": "1399", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "1400", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "cmeam" + }, + "properties": { + "$id": "1401", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "1402", + "forceUpdateTag": { + "$id": "1403", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "1404", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "1405", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "1407", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1408", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "1409", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "1410" + } + }, + "provisioningState": { + "$id": "1411", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "1412", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "1413", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "1414", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "1415", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "1416", + "secretUrl": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "1418", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1419", + "id": { + "$id": "1420", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "1421", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "1422", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "1424", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "1425", + "terminateNotificationProfile": { + "$id": "1426", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "1427", + "notBeforeTimeout": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "1429", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "1430", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "1431", + "notBeforeTimeout": { + "$id": "1432", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "1433", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "1434", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "1435", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "1436", + "capacityReservationGroup": { + "$id": "1437", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1438", + "id": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "1440", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "1441", + "galleryApplications": { + "$id": "1442", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "1443", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "1444", + "tags": { + "$id": "1445", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "1446", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "1448", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1449", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "1450", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "1451", + "vmSizeProperties": { + "$id": "1452", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "1453", + "vCPUsAvailable": { + "$id": "1454", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "1455", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "1456", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "1457", + "id": { + "$id": "1458", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "1459", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "1460", + "id": { + "$id": "1461", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "1462", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "1464", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "1465", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "1466", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "1467", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "1468", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "1469", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "1470", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "1471", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "1473", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "1474", + "principalId": { + "$id": "1475", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "1476", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "1478", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "1479", + "key9851": { + "$id": "1480", + "kind": "model", + "type": { + "$ref": "887" + }, + "value": { + "$id": "1481", + "principalId": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "1484", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "1485", + "key3518": { + "$id": "1486", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "1487", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "1488", + "name": { + "$id": "1489", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "1490", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "1491", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "1492", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "1493", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "1494", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "id": { + "$id": "1495", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "1496", + "kind": "string", + "type": { + "$id": "1497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "testFleet" + }, + "type": { + "$id": "1498", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "1499", + "kind": "model", + "type": { + "$ref": "362" + }, + "value": { + "$id": "1500", + "createdBy": { + "$id": "1501", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "1502", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "1503", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "1504", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "1505", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1507", + "Name": "createOrUpdate", + "ResourceName": "Fleet", + "Description": "Create a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1508", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "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": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1512", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "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": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "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": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "1518", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1519", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1520", + "kind": "constant", + "valueType": { + "$id": "1521", + "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": "1522", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1523", + "kind": "constant", + "valueType": { + "$id": "1524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1525", + "Name": "resource", + "NameInRequest": "resource", + "Description": "Resource create parameters.", + "Type": { + "$ref": "350" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1526", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1527", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "350" + }, + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "1528", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1529", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "1530", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1531", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "Decorators": [ + { + "$id": "1532", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1533", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "1534", + "kind": "http", + "name": "Fleets_CreateOrUpdate", + "description": "Fleets_CreateOrUpdate", + "filePath": "2024-11-01/Fleets_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1535", + "parameter": { + "$ref": "1508" + }, + "value": { + "$id": "1536", + "kind": "string", + "type": { + "$ref": "1509" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1537", + "parameter": { + "$ref": "1512" + }, + "value": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "1513" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1539", + "parameter": { + "$ref": "1515" + }, + "value": { + "$id": "1540", + "kind": "string", + "type": { + "$ref": "1516" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1541", + "parameter": { + "$ref": "1517" + }, + "value": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "1518" + }, + "value": "testFleet" + } + }, + { + "$id": "1543", + "parameter": { + "$ref": "1525" + }, + "value": { + "$id": "1544", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "1545", + "properties": { + "$id": "1546", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "1547", + "spotPriorityProfile": { + "$id": "1548", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "1549", + "capacity": { + "$id": "1550", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1551", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1552", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1554", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1555", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1556", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "1557", + "capacity": { + "$id": "1558", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1559", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1560", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1561", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "1562", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "1563", + "name": { + "$id": "1564", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1565", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1566", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "1567", + "baseVirtualMachineProfile": { + "$id": "1568", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "1569", + "osProfile": { + "$id": "1570", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1571", + "computerNamePrefix": { + "$id": "1572", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "1575", + "kind": "string", + "type": { + "$ref": "469" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "1576", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1577", + "provisionVMAgent": { + "$id": "1578", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1579", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1581", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "1582", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "1583", + "passName": { + "$id": "1584", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1585", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1586", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "1588", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "1589", + "patchMode": { + "$id": "1590", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1591", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "1592", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1593", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "1594", + "rebootSetting": { + "$id": "1595", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1596", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1597", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1598", + "listeners": { + "$id": "1599", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "1600", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "1601", + "protocol": { + "$id": "1602", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "1603", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1604", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1605", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1606", + "disablePasswordAuthentication": { + "$id": "1607", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "1608", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "1609", + "publicKeys": { + "$id": "1610", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "1611", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "1612", + "path": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1614", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1615", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "1616", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "1617", + "patchMode": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1620", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "1621", + "rebootSetting": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1623", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1624", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1625", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "1626", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "1627", + "sourceVault": { + "$id": "1628", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1629", + "id": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1631", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "1632", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "1633", + "certificateUrl": { + "$id": "1634", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1635", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1636", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1637", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1638", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "1639", + "imageReference": { + "$id": "1640", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "1641", + "publisher": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1643", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1644", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1645", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "1646", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1647", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "1648", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1649", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "1650", + "name": { + "$id": "1651", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1652", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1653", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1655", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "1656", + "option": { + "$id": "1657", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1659", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "1660", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "1661", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "1662", + "uri": { + "$id": "1663", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1664", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "1665", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1666", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "1667", + "storageAccountType": { + "$id": "1668", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1669", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1670", + "id": { + "$id": "1671", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1672", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "1673", + "securityEncryptionType": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1675", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1676", + "id": { + "$id": "1677", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1678", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1679", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "1680", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "1681", + "name": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1683", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "1684", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1685", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1687", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1688", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "1689", + "storageAccountType": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1691", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1692", + "id": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1694", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "1695", + "securityEncryptionType": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1697", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "1698", + "id": { + "$id": "1699", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1700", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1701", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "1703", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "1704", + "healthProbe": { + "$id": "1705", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "1706", + "id": { + "$id": "1707", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1708", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "1709", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "1710", + "name": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "1712", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "1713", + "primary": { + "$id": "1714", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1715", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1716", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "1717", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1718", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1719", + "id": { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1721", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "1722", + "dnsServers": { + "$id": "1723", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "1725", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "1726", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "1727", + "name": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "1729", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "1730", + "subnet": { + "$id": "1731", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "1732", + "id": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "1734", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "1735", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "1736", + "name": { + "$id": "1737", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "1738", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "1739", + "idleTimeoutInMinutes": { + "$id": "1740", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "1741", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "1742", + "domainNameLabel": { + "$id": "1743", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "1745", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "1746", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "1747", + "ipTagType": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "1750", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1751", + "id": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "1755", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "1756", + "name": { + "$id": "1757", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "1759", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "1760", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "1761", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1762", + "id": { + "$id": "1763", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "1764", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "1765", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1766", + "id": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "1768", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "1769", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1770", + "id": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "1772", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "1773", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1774", + "id": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "1776", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "1782", + "uefiSettings": { + "$id": "1783", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "1784", + "secureBootEnabled": { + "$id": "1785", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "1786", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "1787", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "1789", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "1790", + "userAssignedIdentityResourceId": { + "$id": "1791", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "1792", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "1793", + "enabled": { + "$id": "1794", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "1796", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "1797", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "1798", + "bootDiagnostics": { + "$id": "1799", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "1800", + "enabled": { + "$id": "1801", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "1803", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "1804", + "extensions": { + "$id": "1805", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "1806", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "1807", + "name": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "1809", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "1810", + "forceUpdateTag": { + "$id": "1811", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "1815", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1816", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "1817", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "1818" + } + }, + "protectedSettings": { + "$id": "1819", + "kind": "dict", + "type": { + "$ref": "772" + }, + "value": { + "$id": "1820" + } + }, + "provisionAfterExtensions": { + "$id": "1821", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "1822", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "1823", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "1824", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "1825", + "secretUrl": { + "$id": "1826", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myvaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "1827", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1828", + "id": { + "$id": "1829", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "1832", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "1833", + "terminateNotificationProfile": { + "$id": "1834", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "1835", + "notBeforeTimeout": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "1837", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "1838", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "1839", + "notBeforeTimeout": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "1841", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "1843", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "1844", + "capacityReservationGroup": { + "$id": "1845", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1846", + "id": { + "$id": "1847", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "1848", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "1849", + "galleryApplications": { + "$id": "1850", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "1851", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "1852", + "tags": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "1854", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "1856", + "kind": "string", + "type": { + "$ref": "823" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "1857", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "1858", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "1859", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "1860", + "vmSizeProperties": { + "$id": "1861", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "1862", + "vCPUsAvailable": { + "$id": "1863", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "1864", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "1865", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "1866", + "id": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "1868", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "1869", + "id": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "1871", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "1873", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "1875", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + } + } + }, + "zones": { + "$id": "1876", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "1879", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "1880", + "type": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "1882", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "1883", + "key9851": { + "$id": "1884", + "kind": "model", + "type": { + "$ref": "887" + }, + "value": { + "$id": "1885" + } + } + } + } + } + }, + "tags": { + "$id": "1886", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "1887", + "key3518": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "plan": { + "$id": "1890", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "1891", + "name": { + "$id": "1892", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "1895", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "1896", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1897", + "response": { + "$ref": "1526" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1898", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "1899", + "properties": { + "$id": "1900", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "1901", + "provisioningState": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "1903", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "1904", + "capacity": { + "$id": "1905", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 10 + }, + "minCapacity": { + "$id": "1906", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 20 + }, + "maxPricePerVM": { + "$id": "1907", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1908", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1909", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1910", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1911", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "1912", + "capacity": { + "$id": "1913", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 10 + }, + "minCapacity": { + "$id": "1914", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1916", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "1917", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "1918", + "name": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1920", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1921", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "1922", + "baseVirtualMachineProfile": { + "$id": "1923", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "1924", + "osProfile": { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1926", + "computerNamePrefix": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1929", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1930", + "provisionVMAgent": { + "$id": "1931", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1932", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1934", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "1935", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "1936", + "passName": { + "$id": "1937", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1940", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "1941", + "patchMode": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1943", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1945", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "1946", + "rebootSetting": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1948", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1949", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "1950", + "listeners": { + "$id": "1951", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "1952", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "1953", + "protocol": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1956", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1957", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "1958", + "disablePasswordAuthentication": { + "$id": "1959", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "1960", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "1961", + "publicKeys": { + "$id": "1962", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "1963", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "1964", + "path": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1967", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "1968", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "1969", + "patchMode": { + "$id": "1970", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1971", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1972", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "1973", + "rebootSetting": { + "$id": "1974", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1975", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1976", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1977", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "1978", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "1979", + "sourceVault": { + "$id": "1980", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "1981", + "id": { + "$id": "1982", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1983", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "1984", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "1985", + "certificateUrl": { + "$id": "1986", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1987", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1988", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1989", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1990", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "1991", + "imageReference": { + "$id": "1992", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "1993", + "publisher": { + "$id": "1994", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1997", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2002", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "2003", + "name": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2006", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2008", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "2009", + "option": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "2011", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2012", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "2014", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "2015", + "uri": { + "$id": "2016", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2017", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "2018", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2019", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2020", + "storageAccountType": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2022", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2023", + "id": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2025", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2026", + "securityEncryptionType": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2028", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2029", + "id": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2031", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2032", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "2033", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "2034", + "name": { + "$id": "2035", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2036", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "2037", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2038", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "2039", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2040", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2041", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2042", + "storageAccountType": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2044", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2045", + "id": { + "$id": "2046", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2047", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2048", + "securityEncryptionType": { + "$id": "2049", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2050", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2051", + "id": { + "$id": "2052", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2053", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2054", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2055", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "2056", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2057", + "healthProbe": { + "$id": "2058", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2059", + "id": { + "$id": "2060", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2061", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "2062", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "2063", + "name": { + "$id": "2064", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "2065", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "2066", + "primary": { + "$id": "2067", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2068", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2069", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "2070", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2071", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2072", + "id": { + "$id": "2073", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2074", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "2075", + "dnsServers": { + "$id": "2076", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "2077", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2078", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "2079", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2080", + "name": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2082", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2083", + "subnet": { + "$id": "2084", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2085", + "id": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2087", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2088", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "2089", + "name": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2091", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "2092", + "idleTimeoutInMinutes": { + "$id": "2093", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2094", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "2095", + "domainNameLabel": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2097", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2098", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "2099", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "2100", + "ipTagType": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2102", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2103", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2104", + "id": { + "$id": "2105", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2108", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "2109", + "name": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2111", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2112", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2113", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "2114", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2115", + "id": { + "$id": "2116", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2117", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "2118", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2119", + "id": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2121", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "2122", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2123", + "id": { + "$id": "2124", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2125", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "2126", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2127", + "id": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2129", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "2130", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2131", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2132", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2133", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2134", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "2135", + "uefiSettings": { + "$id": "2136", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "2137", + "secureBootEnabled": { + "$id": "2138", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2139", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2140", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "2141", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2142", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "2143", + "userAssignedIdentityResourceId": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2145", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "2146", + "enabled": { + "$id": "2147", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "2148", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2149", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2150", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "2151", + "bootDiagnostics": { + "$id": "2152", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "2153", + "enabled": { + "$id": "2154", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "2155", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2156", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "2157", + "extensions": { + "$id": "2158", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "2159", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2160", + "name": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2162", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2163", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "2164", + "forceUpdateTag": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2169", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2170", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "2171", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "2172" + } + }, + "provisioningState": { + "$id": "2173", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2174", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "2175", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2176", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2177", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "2178", + "secretUrl": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2180", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2181", + "id": { + "$id": "2182", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2183", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2184", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2185", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2186", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "2187", + "terminateNotificationProfile": { + "$id": "2188", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "2189", + "notBeforeTimeout": { + "$id": "2190", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2191", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2192", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "2193", + "notBeforeTimeout": { + "$id": "2194", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2195", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2196", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2197", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "2198", + "capacityReservationGroup": { + "$id": "2199", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2200", + "id": { + "$id": "2201", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2202", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "2203", + "galleryApplications": { + "$id": "2204", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "2205", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "2206", + "tags": { + "$id": "2207", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2208", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2210", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2211", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "2213", + "vmSizeProperties": { + "$id": "2214", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "2215", + "vCPUsAvailable": { + "$id": "2216", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2217", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2218", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "2219", + "id": { + "$id": "2220", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2221", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2222", + "id": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2224", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2226", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2229", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2231", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2232", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2235", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2236", + "principalId": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2238", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2239", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2240", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "2241", + "key9851": { + "$id": "2242", + "kind": "model", + "type": { + "$ref": "887" + }, + "value": { + "$id": "2243", + "principalId": { + "$id": "2244", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "2246", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "2247", + "name": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2250", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2251", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "2253", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2254", + "key3518": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "id": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "2259", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2260", + "kind": "model", + "type": { + "$ref": "362" + }, + "value": { + "$id": "2261", + "createdBy": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2263", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2265", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2266", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2267", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "2268", + "response": { + "$ref": "1527" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2269", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2270", + "properties": { + "$id": "2271", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "2272", + "provisioningState": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2274", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "2275", + "capacity": { + "$id": "2276", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 0 + }, + "minCapacity": { + "$id": "2277", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 0 + }, + "maxPricePerVM": { + "$id": "2278", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2280", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2281", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2282", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "2283", + "capacity": { + "$id": "2284", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2285", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2287", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "2288", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2289", + "name": { + "$id": "2290", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2291", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2292", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "2293", + "baseVirtualMachineProfile": { + "$id": "2294", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "2295", + "osProfile": { + "$id": "2296", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2297", + "computerNamePrefix": { + "$id": "2298", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2299", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2300", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2301", + "provisionVMAgent": { + "$id": "2302", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2303", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "2304", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2305", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "2306", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "2307", + "passName": { + "$id": "2308", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2309", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2310", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2311", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "2312", + "patchMode": { + "$id": "2313", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2314", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "2315", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2316", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "2317", + "rebootSetting": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2319", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2320", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "2321", + "listeners": { + "$id": "2322", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "2323", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "2324", + "protocol": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2327", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2328", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2329", + "disablePasswordAuthentication": { + "$id": "2330", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "2331", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2332", + "publicKeys": { + "$id": "2333", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "2334", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "2335", + "path": { + "$id": "2336", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2338", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "2339", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "2340", + "patchMode": { + "$id": "2341", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2342", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2343", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "2344", + "rebootSetting": { + "$id": "2345", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2346", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2347", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2348", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "2349", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "2350", + "sourceVault": { + "$id": "2351", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2352", + "id": { + "$id": "2353", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2354", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "2355", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "2356", + "certificateUrl": { + "$id": "2357", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2359", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2360", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2361", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "2362", + "imageReference": { + "$id": "2363", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2364", + "publisher": { + "$id": "2365", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2366", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2367", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2368", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "2369", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "2370", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2371", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "2372", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2373", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "2374", + "name": { + "$id": "2375", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2376", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2377", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "2378", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2379", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "2380", + "option": { + "$id": "2381", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "2382", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2383", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "2384", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "2385", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "2386", + "uri": { + "$id": "2387", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2388", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "2389", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2390", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2391", + "storageAccountType": { + "$id": "2392", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2393", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2394", + "id": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2396", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2397", + "securityEncryptionType": { + "$id": "2398", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2399", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2400", + "id": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2402", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2403", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "2404", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "2405", + "name": { + "$id": "2406", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2407", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2409", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2411", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2412", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2413", + "storageAccountType": { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2415", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2416", + "id": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2418", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2419", + "securityEncryptionType": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2421", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "2422", + "id": { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2424", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2425", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2428", + "healthProbe": { + "$id": "2429", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2430", + "id": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2432", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "2433", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "2434", + "name": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "2437", + "primary": { + "$id": "2438", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2439", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2440", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "2441", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2442", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2443", + "id": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2445", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "2446", + "dnsServers": { + "$id": "2447", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "2448", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2449", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "2450", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2451", + "name": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2453", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2454", + "subnet": { + "$id": "2455", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2456", + "id": { + "$id": "2457", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2458", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2459", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "2460", + "name": { + "$id": "2461", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2462", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "2463", + "idleTimeoutInMinutes": { + "$id": "2464", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2465", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "2466", + "domainNameLabel": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2469", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "2470", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "2471", + "ipTagType": { + "$id": "2472", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2473", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2474", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2475", + "id": { + "$id": "2476", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2478", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2479", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "2480", + "name": { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2482", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2484", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "2485", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2486", + "id": { + "$id": "2487", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2488", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "2489", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2490", + "id": { + "$id": "2491", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2492", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "2493", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2494", + "id": { + "$id": "2495", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2496", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "2497", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2498", + "id": { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2500", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2505", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "2506", + "uefiSettings": { + "$id": "2507", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "2508", + "secureBootEnabled": { + "$id": "2509", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2510", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2511", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "2512", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2513", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "2514", + "userAssignedIdentityResourceId": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2516", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "2517", + "enabled": { + "$id": "2518", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2520", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2521", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "2522", + "bootDiagnostics": { + "$id": "2523", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "2524", + "enabled": { + "$id": "2525", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "2526", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2527", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "2528", + "extensions": { + "$id": "2529", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "2530", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2531", + "name": { + "$id": "2532", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2533", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2534", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "2535", + "forceUpdateTag": { + "$id": "2536", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2539", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2540", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2541", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "2542", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "2543" + } + }, + "provisioningState": { + "$id": "2544", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2545", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2547", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2548", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "2549", + "secretUrl": { + "$id": "2550", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2551", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2552", + "id": { + "$id": "2553", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2554", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2555", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2556", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2557", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "2558", + "terminateNotificationProfile": { + "$id": "2559", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "2560", + "notBeforeTimeout": { + "$id": "2561", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2562", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2563", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "2564", + "notBeforeTimeout": { + "$id": "2565", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2566", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2567", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2568", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "2569", + "capacityReservationGroup": { + "$id": "2570", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2571", + "id": { + "$id": "2572", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2573", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "2574", + "galleryApplications": { + "$id": "2575", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "2576", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "2577", + "tags": { + "$id": "2578", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2579", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2581", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2582", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2583", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "2584", + "vmSizeProperties": { + "$id": "2585", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "2586", + "vCPUsAvailable": { + "$id": "2587", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2588", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2589", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "2590", + "id": { + "$id": "2591", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2592", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2593", + "id": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2595", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "2596", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2597", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2598", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2600", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2603", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "2604", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2606", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2607", + "principalId": { + "$id": "2608", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2609", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2610", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2611", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "2612", + "key9851": { + "$id": "2613", + "kind": "model", + "type": { + "$ref": "887" + }, + "value": { + "$id": "2614", + "principalId": { + "$id": "2615", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2616", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "2617", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2618", + "key3518": { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "2620", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "2621", + "name": { + "$id": "2622", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2623", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2624", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2625", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "id": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2629", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2631", + "kind": "model", + "type": { + "$ref": "362" + }, + "value": { + "$id": "2632", + "createdBy": { + "$id": "2633", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2636", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2639", + "kind": "http", + "name": "Fleets_CreateOrUpdate_MinimumSet", + "description": "Fleets_CreateOrUpdate_MinimumSet", + "filePath": "2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json", + "parameters": [ + { + "$id": "2640", + "parameter": { + "$ref": "1508" + }, + "value": { + "$id": "2641", + "kind": "string", + "type": { + "$ref": "1509" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2642", + "parameter": { + "$ref": "1512" + }, + "value": { + "$id": "2643", + "kind": "string", + "type": { + "$ref": "1513" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2644", + "parameter": { + "$ref": "1515" + }, + "value": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "1516" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2646", + "parameter": { + "$ref": "1517" + }, + "value": { + "$id": "2647", + "kind": "string", + "type": { + "$ref": "1518" + }, + "value": "testFleet" + } + }, + { + "$id": "2648", + "parameter": { + "$ref": "1525" + }, + "value": { + "$id": "2649", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2650", + "properties": { + "$id": "2651", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "2652", + "spotPriorityProfile": { + "$id": "2653", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "2654", + "capacity": { + "$id": "2655", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2656", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "2657", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2658", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2659", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2660", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "2661", + "capacity": { + "$id": "2662", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2663", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2665", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "2666", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2667", + "name": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "2669", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2670", + "name": { + "$id": "2671", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "2672", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2673", + "name": { + "$id": "2674", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "2675", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "2676", + "baseVirtualMachineProfile": { + "$id": "2677", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "2678", + "storageProfile": { + "$id": "2679", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "2680", + "imageReference": { + "$id": "2681", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2682", + "publisher": { + "$id": "2683", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "canonical" + }, + "offer": { + "$id": "2684", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "2685", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "2686", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "2687", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "2688", + "caching": { + "$id": "2689", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "2690", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "2691", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "2692", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2693", + "storageAccountType": { + "$id": "2694", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "2695", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2696", + "computerNamePrefix": { + "$id": "2697", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "2698", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "azureuser" + }, + "adminPassword": { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "TestPassword$0" + }, + "linuxConfiguration": { + "$id": "2700", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2701", + "disablePasswordAuthentication": { + "$id": "2702", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "2703", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2704", + "networkInterfaceConfigurations": { + "$id": "2705", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "2706", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "2707", + "name": { + "$id": "2708", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2709", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "2710", + "primary": { + "$id": "2711", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2712", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": false + }, + "ipConfigurations": { + "$id": "2713", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "2714", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2715", + "name": { + "$id": "2716", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2717", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2718", + "subnet": { + "$id": "2719", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2720", + "id": { + "$id": "2721", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2722", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "2723", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "2724", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2725", + "id": { + "$id": "2726", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2727", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "2728", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "2729", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + } + } + }, + "tags": { + "$id": "2730", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2731", + "key": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "2733", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "eastus2euap" + } + } + } + } + ], + "responses": [ + { + "$id": "2734", + "response": { + "$ref": "1526" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2735", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2736", + "properties": { + "$id": "2737", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "2738", + "provisioningState": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "2740", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "2741", + "capacity": { + "$id": "2742", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2743", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "2744", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2745", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2746", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2747", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "2748", + "capacity": { + "$id": "2749", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2750", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "2751", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2752", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "2753", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2754", + "name": { + "$id": "2755", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "2756", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2757", + "name": { + "$id": "2758", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "2759", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2760", + "name": { + "$id": "2761", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "2762", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "2763", + "baseVirtualMachineProfile": { + "$id": "2764", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "2765", + "storageProfile": { + "$id": "2766", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "2767", + "imageReference": { + "$id": "2768", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2769", + "publisher": { + "$id": "2770", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "canonical" + }, + "offer": { + "$id": "2771", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "2774", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "2775", + "caching": { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "2779", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2780", + "storageAccountType": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "2782", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2783", + "computerNamePrefix": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "2786", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2787", + "disablePasswordAuthentication": { + "$id": "2788", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "2789", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2790", + "networkInterfaceConfigurations": { + "$id": "2791", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "2792", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "2793", + "name": { + "$id": "2794", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2795", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "2796", + "primary": { + "$id": "2797", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2798", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": false + }, + "ipConfigurations": { + "$id": "2799", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "2800", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2801", + "name": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2803", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2804", + "subnet": { + "$id": "2805", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2806", + "id": { + "$id": "2807", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2808", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "2809", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "2810", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2811", + "id": { + "$id": "2812", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2813", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "2814", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "2815", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2817", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "2818", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2819", + "key": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "2821", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "2822", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + }, + { + "$id": "2825", + "response": { + "$ref": "1527" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2826", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2827", + "properties": { + "$id": "2828", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "2829", + "provisioningState": { + "$id": "2830", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2831", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "2832", + "capacity": { + "$id": "2833", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2834", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "2835", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2836", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2837", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2838", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "2839", + "capacity": { + "$id": "2840", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 2 + }, + "minCapacity": { + "$id": "2841", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "2842", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2843", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "2844", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2845", + "name": { + "$id": "2846", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "2847", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2848", + "name": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "2850", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2851", + "name": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "2853", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "2854", + "baseVirtualMachineProfile": { + "$id": "2855", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "2856", + "storageProfile": { + "$id": "2857", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "2858", + "imageReference": { + "$id": "2859", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2860", + "publisher": { + "$id": "2861", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "canonical" + }, + "offer": { + "$id": "2862", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "2863", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "2864", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "2865", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "2866", + "caching": { + "$id": "2867", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "2869", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "2870", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "2871", + "storageAccountType": { + "$id": "2872", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "2873", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2874", + "computerNamePrefix": { + "$id": "2875", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "2876", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "2877", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "2878", + "disablePasswordAuthentication": { + "$id": "2879", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "2880", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2881", + "networkInterfaceConfigurations": { + "$id": "2882", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "2883", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "2884", + "name": { + "$id": "2885", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2886", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "2887", + "primary": { + "$id": "2888", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2889", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": false + }, + "ipConfigurations": { + "$id": "2890", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "2891", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2892", + "name": { + "$id": "2893", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "2894", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2895", + "subnet": { + "$id": "2896", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "2897", + "id": { + "$id": "2898", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2899", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "2900", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "2901", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "2902", + "id": { + "$id": "2903", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2904", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "2905", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "2906", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2907", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2908", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "2909", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "2910", + "key": { + "$id": "2911", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "2912", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "2913", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2914", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "2915", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + } + ] + } + ] + }, + { + "$id": "2916", + "Name": "update", + "ResourceName": "Fleet", + "Description": "Update a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2917", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2919", + "Type": { + "$id": "2920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2921", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2922", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2924", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2926", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "2927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2928", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2929", + "kind": "constant", + "valueType": { + "$id": "2930", + "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": "2931", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2932", + "kind": "constant", + "valueType": { + "$id": "2933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2934", + "Name": "properties", + "NameInRequest": "properties", + "Description": "The resource properties to be updated.", + "Type": { + "$ref": "924" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2935", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2936", + "StatusCodes": [ + 202 + ], + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "2937", + "Name": "location", + "NameInResponse": "Location", + "Description": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2939", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2940", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "2941", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2942", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.update", + "Decorators": [], + "Examples": [ + { + "$id": "2943", + "kind": "http", + "name": "Fleets_Update", + "description": "Fleets_Update", + "filePath": "2024-11-01/Fleets_Update.json", + "parameters": [ + { + "$id": "2944", + "parameter": { + "$ref": "2917" + }, + "value": { + "$id": "2945", + "kind": "string", + "type": { + "$ref": "2918" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2946", + "parameter": { + "$ref": "2921" + }, + "value": { + "$id": "2947", + "kind": "string", + "type": { + "$ref": "2922" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2948", + "parameter": { + "$ref": "2924" + }, + "value": { + "$id": "2949", + "kind": "string", + "type": { + "$ref": "2925" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2950", + "parameter": { + "$ref": "2926" + }, + "value": { + "$id": "2951", + "kind": "string", + "type": { + "$ref": "2927" + }, + "value": "testFleet" + } + }, + { + "$id": "2952", + "parameter": { + "$ref": "2934" + }, + "value": { + "$id": "2953", + "kind": "model", + "type": { + "$ref": "924" + }, + "value": { + "$id": "2954", + "identity": { + "$id": "2955", + "kind": "model", + "type": { + "$ref": "930" + }, + "value": { + "$id": "2956", + "type": { + "$id": "2957", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2958", + "kind": "dict", + "type": { + "$ref": "933" + }, + "value": { + "$id": "2959" + } + } + } + }, + "tags": { + "$id": "2960", + "kind": "dict", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2961" + } + }, + "properties": { + "$id": "2962", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "2963", + "spotPriorityProfile": { + "$id": "2964", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "2965", + "capacity": { + "$id": "2966", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2967", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "2968", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2969", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2970", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2971", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2972", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "2973", + "capacity": { + "$id": "2974", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2975", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2977", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "2978", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "2979", + "name": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2981", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2982", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "2983", + "baseVirtualMachineProfile": { + "$id": "2984", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "2985", + "osProfile": { + "$id": "2986", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2987", + "computerNamePrefix": { + "$id": "2988", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2989", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "2990", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "2991", + "kind": "string", + "type": { + "$ref": "469" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "2992", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2993", + "provisionVMAgent": { + "$id": "2994", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2995", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "2996", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2997", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "2998", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "2999", + "passName": { + "$id": "3000", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3001", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3002", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "3003", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "3004", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "3005", + "patchMode": { + "$id": "3006", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3007", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "3008", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3009", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "3010", + "rebootSetting": { + "$id": "3011", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3012", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3013", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "3014", + "listeners": { + "$id": "3015", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "3016", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "3017", + "protocol": { + "$id": "3018", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3019", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3020", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3021", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3022", + "disablePasswordAuthentication": { + "$id": "3023", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "3024", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "3025", + "publicKeys": { + "$id": "3026", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "3027", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "3028", + "path": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3030", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3031", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "3032", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "3033", + "patchMode": { + "$id": "3034", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3035", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3036", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "3037", + "rebootSetting": { + "$id": "3038", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3039", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3040", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3041", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "3042", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "3043", + "sourceVault": { + "$id": "3044", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3045", + "id": { + "$id": "3046", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3047", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "3048", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "3049", + "certificateUrl": { + "$id": "3050", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3052", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3053", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3054", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "3055", + "imageReference": { + "$id": "3056", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3057", + "publisher": { + "$id": "3058", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3060", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3061", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3062", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "3064", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3065", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "3066", + "name": { + "$id": "3067", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3069", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "3070", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3071", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "3072", + "option": { + "$id": "3073", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3074", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3075", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "3076", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3077", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "3078", + "uri": { + "$id": "3079", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3080", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "3081", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3082", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "3083", + "storageAccountType": { + "$id": "3084", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3085", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3086", + "id": { + "$id": "3087", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3088", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3089", + "securityEncryptionType": { + "$id": "3090", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3091", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3092", + "id": { + "$id": "3093", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3094", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3095", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "3096", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "3097", + "name": { + "$id": "3098", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3099", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "3100", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3101", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "3102", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3103", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3104", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "3105", + "storageAccountType": { + "$id": "3106", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3107", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3108", + "id": { + "$id": "3109", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3110", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3111", + "securityEncryptionType": { + "$id": "3112", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3113", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3114", + "id": { + "$id": "3115", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3116", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3117", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3118", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3119", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "3120", + "healthProbe": { + "$id": "3121", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "3122", + "id": { + "$id": "3123", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3124", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "3125", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "3126", + "name": { + "$id": "3127", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "3128", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "3129", + "primary": { + "$id": "3130", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3131", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3132", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "3133", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3134", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3135", + "id": { + "$id": "3136", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3137", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3138", + "dnsServers": { + "$id": "3139", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "3140", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3141", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "3142", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "3143", + "name": { + "$id": "3144", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3145", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3146", + "subnet": { + "$id": "3147", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "3148", + "id": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3150", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3151", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "3152", + "name": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3154", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "3155", + "idleTimeoutInMinutes": { + "$id": "3156", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3157", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "3158", + "domainNameLabel": { + "$id": "3159", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3160", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3161", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "3162", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "3163", + "ipTagType": { + "$id": "3164", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3166", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3167", + "id": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3169", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3170", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3171", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "3172", + "name": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3174", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3175", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3176", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "3177", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3178", + "id": { + "$id": "3179", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3180", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "3181", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3182", + "id": { + "$id": "3183", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3184", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "3185", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3186", + "id": { + "$id": "3187", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3188", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "3189", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3190", + "id": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3192", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "3193", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3194", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3195", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3196", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3197", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "3198", + "uefiSettings": { + "$id": "3199", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "3200", + "secureBootEnabled": { + "$id": "3201", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3202", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3203", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "3204", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3205", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3206", + "userAssignedIdentityResourceId": { + "$id": "3207", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3208", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3209", + "enabled": { + "$id": "3210", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3212", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3213", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "3214", + "bootDiagnostics": { + "$id": "3215", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "3216", + "enabled": { + "$id": "3217", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "3218", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3219", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3220", + "extensions": { + "$id": "3221", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "3222", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3223", + "name": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3225", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3226", + "forceUpdateTag": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3229", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3231", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3232", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "3233", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "3234" + } + }, + "protectedSettings": { + "$id": "3235", + "kind": "dict", + "type": { + "$ref": "772" + }, + "value": { + "$id": "3236" + } + }, + "provisionAfterExtensions": { + "$id": "3237", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "3238", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3239", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3240", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "3241", + "secretUrl": { + "$id": "3242", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3243", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3244", + "id": { + "$id": "3245", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3246", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3247", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3248", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "3249", + "terminateNotificationProfile": { + "$id": "3250", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3251", + "notBeforeTimeout": { + "$id": "3252", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3253", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3254", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "3255", + "notBeforeTimeout": { + "$id": "3256", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3257", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3258", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3259", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "3260", + "capacityReservationGroup": { + "$id": "3261", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3262", + "id": { + "$id": "3263", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3264", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "3265", + "galleryApplications": { + "$id": "3266", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "3267", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "3268", + "tags": { + "$id": "3269", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3270", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "3272", + "kind": "string", + "type": { + "$ref": "823" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3273", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3274", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3275", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "3276", + "vmSizeProperties": { + "$id": "3277", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "3278", + "vCPUsAvailable": { + "$id": "3279", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3280", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3281", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "3282", + "id": { + "$id": "3283", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3284", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3285", + "id": { + "$id": "3286", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3287", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "3288", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3289", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "3290", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3291", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + } + } + }, + "plan": { + "$id": "3292", + "kind": "model", + "type": { + "$ref": "936" + }, + "value": { + "$id": "3293", + "name": { + "$id": "3294", + "kind": "string", + "type": { + "$ref": "938" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3295", + "kind": "string", + "type": { + "$ref": "940" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3296", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3297", + "kind": "string", + "type": { + "$ref": "944" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3298", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3299", + "response": { + "$ref": "2935" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3300", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "3301", + "properties": { + "$id": "3302", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "3303", + "spotPriorityProfile": { + "$id": "3304", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "3305", + "capacity": { + "$id": "3306", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3307", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3308", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3309", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3311", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3312", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "3313", + "capacity": { + "$id": "3314", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3315", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3316", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3317", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "3318", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "3319", + "name": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3321", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3322", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "3323", + "baseVirtualMachineProfile": { + "$id": "3324", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "3325", + "osProfile": { + "$id": "3326", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "3327", + "computerNamePrefix": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3329", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "3330", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "3331", + "provisionVMAgent": { + "$id": "3332", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3333", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "3334", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3335", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "3336", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "3337", + "passName": { + "$id": "3338", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3339", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3340", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "3341", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "3342", + "patchMode": { + "$id": "3343", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3344", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "3345", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3346", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "3347", + "rebootSetting": { + "$id": "3348", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3349", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3350", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "3351", + "listeners": { + "$id": "3352", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "3353", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "3354", + "protocol": { + "$id": "3355", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3356", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3357", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3358", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3359", + "disablePasswordAuthentication": { + "$id": "3360", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "3361", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "3362", + "publicKeys": { + "$id": "3363", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "3365", + "path": { + "$id": "3366", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3367", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3368", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "3369", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "3370", + "patchMode": { + "$id": "3371", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3372", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3373", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "3374", + "rebootSetting": { + "$id": "3375", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3376", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3377", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3378", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "3379", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "3380", + "sourceVault": { + "$id": "3381", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3382", + "id": { + "$id": "3383", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3384", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "3385", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "3386", + "certificateUrl": { + "$id": "3387", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3388", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3389", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3390", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3391", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "3392", + "imageReference": { + "$id": "3393", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3394", + "publisher": { + "$id": "3395", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3396", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3397", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3398", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3399", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3400", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "3401", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + }, + "exactVersion": { + "$id": "3402", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "zjbntmiskjexlr" + } + } + }, + "osDisk": { + "$id": "3403", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "3404", + "name": { + "$id": "3405", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3406", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3407", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "3408", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3409", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "3410", + "option": { + "$id": "3411", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3412", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3413", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "3414", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3415", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "3416", + "uri": { + "$id": "3417", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3418", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "3419", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3420", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "3421", + "storageAccountType": { + "$id": "3422", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3423", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3424", + "id": { + "$id": "3425", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3426", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3427", + "securityEncryptionType": { + "$id": "3428", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3429", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3430", + "id": { + "$id": "3431", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3432", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3433", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "3434", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "3435", + "name": { + "$id": "3436", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3437", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "3438", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3439", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "3440", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3441", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3442", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "3443", + "storageAccountType": { + "$id": "3444", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3445", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3446", + "id": { + "$id": "3447", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3448", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3449", + "securityEncryptionType": { + "$id": "3450", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3451", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3452", + "id": { + "$id": "3453", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3454", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3455", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3457", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "3458", + "healthProbe": { + "$id": "3459", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "3460", + "id": { + "$id": "3461", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3462", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "3463", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "3464", + "name": { + "$id": "3465", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "3466", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "3467", + "primary": { + "$id": "3468", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3469", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3470", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "3471", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3472", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3473", + "id": { + "$id": "3474", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3475", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3476", + "dnsServers": { + "$id": "3477", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "3478", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3479", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "3480", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "3481", + "name": { + "$id": "3482", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3483", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3484", + "subnet": { + "$id": "3485", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "3486", + "id": { + "$id": "3487", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3488", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3489", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "3490", + "name": { + "$id": "3491", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3492", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "3493", + "idleTimeoutInMinutes": { + "$id": "3494", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3495", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "3496", + "domainNameLabel": { + "$id": "3497", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3498", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3499", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "3500", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "3501", + "ipTagType": { + "$id": "3502", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3504", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3505", + "id": { + "$id": "3506", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3509", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "3510", + "name": { + "$id": "3511", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3512", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3514", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "3515", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3516", + "id": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3518", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "3519", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3520", + "id": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3522", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "3523", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3524", + "id": { + "$id": "3525", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3526", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "3527", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3528", + "id": { + "$id": "3529", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3530", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "3531", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3532", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3533", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3534", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3535", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "3536", + "uefiSettings": { + "$id": "3537", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "3538", + "secureBootEnabled": { + "$id": "3539", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3540", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3541", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "3542", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3543", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3544", + "userAssignedIdentityResourceId": { + "$id": "3545", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3546", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3547", + "enabled": { + "$id": "3548", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "3549", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3550", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3551", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "3552", + "bootDiagnostics": { + "$id": "3553", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "3554", + "enabled": { + "$id": "3555", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "3556", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3557", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3558", + "extensions": { + "$id": "3559", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "3560", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3561", + "name": { + "$id": "3562", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3563", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3564", + "forceUpdateTag": { + "$id": "3565", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3566", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3567", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3568", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3569", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3570", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "provisionAfterExtensions": { + "$id": "3571", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "3572", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3573", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3574", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "3575", + "secretUrl": { + "$id": "3576", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3577", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3578", + "id": { + "$id": "3579", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + }, + "settings": { + "$id": "3580", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "3581" + } + }, + "provisioningState": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "Succeeded" + } + } + }, + "type": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "cmeam" + }, + "id": { + "$id": "3584", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3585", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3586", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3587", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "3588", + "terminateNotificationProfile": { + "$id": "3589", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3590", + "notBeforeTimeout": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3592", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3593", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "3594", + "notBeforeTimeout": { + "$id": "3595", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3596", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3597", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3598", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "3599", + "capacityReservationGroup": { + "$id": "3600", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3601", + "id": { + "$id": "3602", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3603", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "3604", + "galleryApplications": { + "$id": "3605", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "3606", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "3607", + "tags": { + "$id": "3608", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3609", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3610", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3611", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3612", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3613", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "3614", + "vmSizeProperties": { + "$id": "3615", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "3616", + "vCPUsAvailable": { + "$id": "3617", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3618", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3619", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "3620", + "id": { + "$id": "3621", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3622", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3623", + "id": { + "$id": "3624", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3625", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "3626", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3627", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "3628", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3630", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "provisioningState": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "timeCreated": { + "$id": "3632", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3633", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "3634", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "3635", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "3636", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "3637", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3638", + "type": { + "$id": "3639", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3640", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "3641" + } + }, + "principalId": { + "$id": "3642", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "3643", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + }, + "tags": { + "$id": "3644", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "3645" + } + }, + "location": { + "$id": "3646", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "plan": { + "$id": "3647", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "3648", + "name": { + "$id": "3649", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "uapfngmdekvpgjhomthtpxjfdmmll" + }, + "publisher": { + "$id": "3650", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "aqhles" + }, + "product": { + "$id": "3651", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "bfzbkdnbexmedxdc" + }, + "promotionCode": { + "$id": "3652", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "gspehogwfjxirz" + }, + "version": { + "$id": "3653", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "yza" + } + } + }, + "id": { + "$id": "3654", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3655", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "3656", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "3657", + "kind": "model", + "type": { + "$ref": "362" + }, + "value": { + "$id": "3658", + "createdBy": { + "$id": "3659", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "3660", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "3661", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "3663", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3664", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "3665", + "response": { + "$ref": "2936" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "3666", + "Name": "delete", + "ResourceName": "Fleet", + "Description": "Delete a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3667", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3669", + "Type": { + "$id": "3670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3671", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3672", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3674", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3676", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Description": "The name of the Compute Fleet", + "Type": { + "$id": "3677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3678", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3679", + "kind": "constant", + "valueType": { + "$id": "3680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3681", + "StatusCodes": [ + 202 + ], + "BodyMediaType": "Json", + "Headers": [ + { + "$id": "3682", + "Name": "location", + "NameInResponse": "Location", + "Description": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "3683", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3684", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "3685", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "3686", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "BufferResponse": true, + "LongRunning": { + "$id": "3687", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "3688", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.delete", + "Decorators": [], + "Examples": [ + { + "$id": "3689", + "kind": "http", + "name": "Fleets_Delete", + "description": "Fleets_Delete", + "filePath": "2024-11-01/Fleets_Delete.json", + "parameters": [ + { + "$id": "3690", + "parameter": { + "$ref": "3667" + }, + "value": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "3668" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3692", + "parameter": { + "$ref": "3671" + }, + "value": { + "$id": "3693", + "kind": "string", + "type": { + "$ref": "3672" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3694", + "parameter": { + "$ref": "3674" + }, + "value": { + "$id": "3695", + "kind": "string", + "type": { + "$ref": "3675" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3696", + "parameter": { + "$ref": "3676" + }, + "value": { + "$id": "3697", + "kind": "string", + "type": { + "$ref": "3677" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "3698", + "response": { + "$ref": "3681" + }, + "statusCode": 202 + }, + { + "$id": "3699", + "response": { + "$ref": "3686" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3700", + "Name": "listByResourceGroup", + "ResourceName": "Fleet", + "Description": "List Fleet resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3701", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3703", + "Type": { + "$id": "3704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3705", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3706", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3708", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3710", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3711", + "kind": "constant", + "valueType": { + "$id": "3712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3713", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "961" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets", + "BufferResponse": true, + "Paging": { + "$id": "3714", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "3715", + "kind": "http", + "name": "Fleets_ListByResourceGroup", + "description": "Fleets_ListByResourceGroup", + "filePath": "2024-11-01/Fleets_ListByResourceGroup.json", + "parameters": [ + { + "$id": "3716", + "parameter": { + "$ref": "3701" + }, + "value": { + "$id": "3717", + "kind": "string", + "type": { + "$ref": "3702" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3718", + "parameter": { + "$ref": "3705" + }, + "value": { + "$id": "3719", + "kind": "string", + "type": { + "$ref": "3706" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3720", + "parameter": { + "$ref": "3708" + }, + "value": { + "$id": "3721", + "kind": "string", + "type": { + "$ref": "3709" + }, + "value": "rgazurefleet" + } + } + ], + "responses": [ + { + "$id": "3722", + "response": { + "$ref": "3713" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3723", + "kind": "model", + "type": { + "$ref": "961" + }, + "value": { + "$id": "3724", + "value": { + "$id": "3725", + "kind": "array", + "type": { + "$ref": "963" + }, + "value": [ + { + "$id": "3726", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "3727", + "properties": { + "$id": "3728", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "3729", + "provisioningState": { + "$id": "3730", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "3731", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "3732", + "capacity": { + "$id": "3733", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3734", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3735", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3736", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3737", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3738", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3739", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "3740", + "capacity": { + "$id": "3741", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3742", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3743", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3744", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "3745", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "3746", + "name": { + "$id": "3747", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3748", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3749", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "3750", + "baseVirtualMachineProfile": { + "$id": "3751", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "3752", + "osProfile": { + "$id": "3753", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "3754", + "computerNamePrefix": { + "$id": "3755", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "3757", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "3758", + "provisionVMAgent": { + "$id": "3759", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3760", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3762", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "3763", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "3764", + "passName": { + "$id": "3765", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3766", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3767", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "3768", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "3769", + "patchMode": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3771", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3773", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "3774", + "rebootSetting": { + "$id": "3775", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3776", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3777", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "3778", + "listeners": { + "$id": "3779", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "3780", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "3781", + "protocol": { + "$id": "3782", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3783", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3784", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3785", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "3786", + "disablePasswordAuthentication": { + "$id": "3787", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "3788", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "3789", + "publicKeys": { + "$id": "3790", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "3791", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "3792", + "path": { + "$id": "3793", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3794", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3795", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "3796", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "3797", + "patchMode": { + "$id": "3798", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3799", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3800", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "3801", + "rebootSetting": { + "$id": "3802", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3803", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3804", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3805", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "3806", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "3807", + "sourceVault": { + "$id": "3808", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3809", + "id": { + "$id": "3810", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3811", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "3812", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "3813", + "certificateUrl": { + "$id": "3814", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3815", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3816", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3817", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3818", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "3819", + "imageReference": { + "$id": "3820", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "3821", + "publisher": { + "$id": "3822", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3823", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3824", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "3826", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "3827", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3828", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "3829", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3830", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "3831", + "name": { + "$id": "3832", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3833", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3834", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "3835", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3836", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "3837", + "option": { + "$id": "3838", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3839", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3840", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3842", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "3843", + "uri": { + "$id": "3844", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3845", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "3846", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3847", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "3848", + "storageAccountType": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3850", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3851", + "id": { + "$id": "3852", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3853", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3854", + "securityEncryptionType": { + "$id": "3855", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3856", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3857", + "id": { + "$id": "3858", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3859", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3860", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "3861", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "3862", + "name": { + "$id": "3863", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3864", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "3865", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3866", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "3867", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3868", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3869", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "3870", + "storageAccountType": { + "$id": "3871", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3872", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3873", + "id": { + "$id": "3874", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3875", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3876", + "securityEncryptionType": { + "$id": "3877", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3878", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "3879", + "id": { + "$id": "3880", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3881", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3882", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3883", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3884", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "3885", + "healthProbe": { + "$id": "3886", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "3887", + "id": { + "$id": "3888", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3889", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "3890", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "3891", + "name": { + "$id": "3892", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "3893", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "3894", + "primary": { + "$id": "3895", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3896", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3897", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "3898", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3899", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3900", + "id": { + "$id": "3901", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3902", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "3903", + "dnsServers": { + "$id": "3904", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "3905", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3906", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "3907", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "3908", + "name": { + "$id": "3909", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3910", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3911", + "subnet": { + "$id": "3912", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "3913", + "id": { + "$id": "3914", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3915", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3916", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "3917", + "name": { + "$id": "3918", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3919", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "3920", + "idleTimeoutInMinutes": { + "$id": "3921", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3922", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "3923", + "domainNameLabel": { + "$id": "3924", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3925", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3926", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "3927", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "3928", + "ipTagType": { + "$id": "3929", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3931", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3932", + "id": { + "$id": "3933", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3934", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3935", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3936", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "3937", + "name": { + "$id": "3938", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3940", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3941", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "3942", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3943", + "id": { + "$id": "3944", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3945", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "3946", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3947", + "id": { + "$id": "3948", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3949", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "3950", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3951", + "id": { + "$id": "3952", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3953", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "3954", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "3955", + "id": { + "$id": "3956", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3957", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "3958", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3959", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3960", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3961", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3962", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "3963", + "uefiSettings": { + "$id": "3964", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "3965", + "secureBootEnabled": { + "$id": "3966", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3967", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3968", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "3969", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3970", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3971", + "userAssignedIdentityResourceId": { + "$id": "3972", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3973", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3974", + "enabled": { + "$id": "3975", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "3976", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3977", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3978", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "3979", + "bootDiagnostics": { + "$id": "3980", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "3981", + "enabled": { + "$id": "3982", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "3983", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3984", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "3985", + "extensions": { + "$id": "3986", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "3987", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3988", + "name": { + "$id": "3989", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "3990", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "cmeam" + }, + "properties": { + "$id": "3991", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3992", + "forceUpdateTag": { + "$id": "3993", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3994", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3995", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3996", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3997", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3998", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "3999", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "4000" + } + }, + "provisioningState": { + "$id": "4001", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "4002", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "4003", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4004", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4005", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "4006", + "secretUrl": { + "$id": "4007", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4008", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4009", + "id": { + "$id": "4010", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "4011", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4012", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4013", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4014", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "4015", + "terminateNotificationProfile": { + "$id": "4016", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "4017", + "notBeforeTimeout": { + "$id": "4018", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4019", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4020", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4021", + "notBeforeTimeout": { + "$id": "4022", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4023", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4024", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4025", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "4026", + "capacityReservationGroup": { + "$id": "4027", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4028", + "id": { + "$id": "4029", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4030", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "4031", + "galleryApplications": { + "$id": "4032", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "4033", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "4034", + "tags": { + "$id": "4035", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4036", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4037", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4038", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4039", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4040", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "4041", + "vmSizeProperties": { + "$id": "4042", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "4043", + "vCPUsAvailable": { + "$id": "4044", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4045", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4046", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "4047", + "id": { + "$id": "4048", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4049", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4050", + "id": { + "$id": "4051", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4052", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "4053", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4054", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4055", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4056", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4057", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4058", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4059", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4060", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "4061", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "4062", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4063", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4064", + "principalId": { + "$id": "4065", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4066", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4067", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4068", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "4069", + "key9851": { + "$id": "4070", + "kind": "model", + "type": { + "$ref": "887" + }, + "value": { + "$id": "4071", + "principalId": { + "$id": "4072", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4073", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4074", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "4075", + "name": { + "$id": "4076", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4077", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4078", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4079", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4080", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4081", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "4082", + "key3518": { + "$id": "4083", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4084", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "id": { + "$id": "4085", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4086", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "4087", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4088", + "kind": "model", + "type": { + "$ref": "362" + }, + "value": { + "$id": "4089", + "createdBy": { + "$id": "4090", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4091", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "4092", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4093", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4094", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4095", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4096", + "kind": "string", + "type": { + "$ref": "965" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "4097", + "Name": "listBySubscription", + "ResourceName": "Fleet", + "Description": "List Fleet resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4098", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "4099", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4100", + "Type": { + "$id": "4101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4102", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4103", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4105", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4106", + "kind": "constant", + "valueType": { + "$id": "4107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4108", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "961" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets", + "BufferResponse": true, + "Paging": { + "$id": "4109", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "4110", + "kind": "http", + "name": "Fleets_ListBySubscription", + "description": "Fleets_ListBySubscription", + "filePath": "2024-11-01/Fleets_ListBySubscription.json", + "parameters": [ + { + "$id": "4111", + "parameter": { + "$ref": "4098" + }, + "value": { + "$id": "4112", + "kind": "string", + "type": { + "$ref": "4099" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4113", + "parameter": { + "$ref": "4102" + }, + "value": { + "$id": "4114", + "kind": "string", + "type": { + "$ref": "4103" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + } + ], + "responses": [ + { + "$id": "4115", + "response": { + "$ref": "4108" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4116", + "kind": "model", + "type": { + "$ref": "961" + }, + "value": { + "$id": "4117", + "value": { + "$id": "4118", + "kind": "array", + "type": { + "$ref": "963" + }, + "value": [ + { + "$id": "4119", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "4120", + "properties": { + "$id": "4121", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "4122", + "provisioningState": { + "$id": "4123", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4124", + "kind": "model", + "type": { + "$ref": "385" + }, + "value": { + "$id": "4125", + "capacity": { + "$id": "4126", + "kind": "number", + "type": { + "$ref": "387" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4127", + "kind": "number", + "type": { + "$ref": "389" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4128", + "kind": "number", + "type": { + "$ref": "391" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4129", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4130", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4131", + "kind": "boolean", + "type": { + "$ref": "395" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4132", + "kind": "model", + "type": { + "$ref": "397" + }, + "value": { + "$id": "4133", + "capacity": { + "$id": "4134", + "kind": "number", + "type": { + "$ref": "399" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4135", + "kind": "number", + "type": { + "$ref": "401" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4136", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4137", + "kind": "array", + "type": { + "$ref": "404" + }, + "value": [ + { + "$id": "4138", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "4139", + "name": { + "$id": "4140", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4141", + "kind": "number", + "type": { + "$ref": "409" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4142", + "kind": "model", + "type": { + "$ref": "854" + }, + "value": { + "$id": "4143", + "baseVirtualMachineProfile": { + "$id": "4144", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "$id": "4145", + "osProfile": { + "$id": "4146", + "kind": "model", + "type": { + "$ref": "461" + }, + "value": { + "$id": "4147", + "computerNamePrefix": { + "$id": "4148", + "kind": "string", + "type": { + "$ref": "463" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4149", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4150", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "4151", + "provisionVMAgent": { + "$id": "4152", + "kind": "boolean", + "type": { + "$ref": "473" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4153", + "kind": "boolean", + "type": { + "$ref": "475" + }, + "value": true + }, + "timeZone": { + "$id": "4154", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4155", + "kind": "array", + "type": { + "$ref": "479" + }, + "value": [ + { + "$id": "4156", + "kind": "model", + "type": { + "$ref": "480" + }, + "value": { + "$id": "4157", + "passName": { + "$id": "4158", + "kind": "string", + "type": { + "$ref": "482" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4159", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4160", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4161", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "4162", + "patchMode": { + "$id": "4163", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4164", + "kind": "boolean", + "type": { + "$ref": "492" + }, + "value": true + }, + "assessmentMode": { + "$id": "4165", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4166", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "4167", + "rebootSetting": { + "$id": "4168", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4169", + "kind": "boolean", + "type": { + "$ref": "498" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4170", + "kind": "model", + "type": { + "$ref": "500" + }, + "value": { + "$id": "4171", + "listeners": { + "$id": "4172", + "kind": "array", + "type": { + "$ref": "502" + }, + "value": [ + { + "$id": "4173", + "kind": "model", + "type": { + "$ref": "503" + }, + "value": { + "$id": "4174", + "protocol": { + "$id": "4175", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4176", + "kind": "string", + "type": { + "$ref": "506" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4177", + "kind": "boolean", + "type": { + "$ref": "508" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4178", + "kind": "model", + "type": { + "$ref": "510" + }, + "value": { + "$id": "4179", + "disablePasswordAuthentication": { + "$id": "4180", + "kind": "boolean", + "type": { + "$ref": "512" + }, + "value": true + }, + "ssh": { + "$id": "4181", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "4182", + "publicKeys": { + "$id": "4183", + "kind": "array", + "type": { + "$ref": "516" + }, + "value": [ + { + "$id": "4184", + "kind": "model", + "type": { + "$ref": "517" + }, + "value": { + "$id": "4185", + "path": { + "$id": "4186", + "kind": "string", + "type": { + "$ref": "519" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4187", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4188", + "kind": "boolean", + "type": { + "$ref": "523" + }, + "value": true + }, + "patchSettings": { + "$id": "4189", + "kind": "model", + "type": { + "$ref": "525" + }, + "value": { + "$id": "4190", + "patchMode": { + "$id": "4191", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4192", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4193", + "kind": "model", + "type": { + "$ref": "529" + }, + "value": { + "$id": "4194", + "rebootSetting": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4196", + "kind": "boolean", + "type": { + "$ref": "532" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4197", + "kind": "boolean", + "type": { + "$ref": "534" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4198", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "4199", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "4200", + "sourceVault": { + "$id": "4201", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4202", + "id": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4204", + "kind": "array", + "type": { + "$ref": "544" + }, + "value": [ + { + "$id": "4205", + "kind": "model", + "type": { + "$ref": "545" + }, + "value": { + "$id": "4206", + "certificateUrl": { + "$id": "4207", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4208", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4209", + "kind": "boolean", + "type": { + "$ref": "551" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4210", + "kind": "boolean", + "type": { + "$ref": "553" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4211", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "4212", + "imageReference": { + "$id": "4213", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "4214", + "publisher": { + "$id": "4215", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4216", + "kind": "string", + "type": { + "$ref": "564" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4217", + "kind": "string", + "type": { + "$ref": "566" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4218", + "kind": "string", + "type": { + "$ref": "568" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4219", + "kind": "string", + "type": { + "$ref": "570" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4220", + "kind": "string", + "type": { + "$ref": "572" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4221", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "vlqe" + }, + "id": { + "$id": "4222", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4223", + "kind": "model", + "type": { + "$ref": "576" + }, + "value": { + "$id": "4224", + "name": { + "$id": "4225", + "kind": "string", + "type": { + "$ref": "578" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4226", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4227", + "kind": "boolean", + "type": { + "$ref": "581" + }, + "value": true + }, + "createOption": { + "$id": "4228", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4229", + "kind": "model", + "type": { + "$ref": "584" + }, + "value": { + "$id": "4230", + "option": { + "$id": "4231", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "4232", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4233", + "kind": "number", + "type": { + "$ref": "588" + }, + "value": 14 + }, + "osType": { + "$id": "4234", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "4235", + "kind": "model", + "type": { + "$ref": "591" + }, + "value": { + "$id": "4236", + "uri": { + "$id": "4237", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4238", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "4239", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4240", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "4241", + "storageAccountType": { + "$id": "4242", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4243", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "4244", + "id": { + "$id": "4245", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4246", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "4247", + "securityEncryptionType": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4249", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "4250", + "id": { + "$id": "4251", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4252", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4253", + "kind": "array", + "type": { + "$ref": "611" + }, + "value": [ + { + "$id": "4254", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "4255", + "name": { + "$id": "4256", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4257", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 14 + }, + "caching": { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4259", + "kind": "boolean", + "type": { + "$ref": "619" + }, + "value": true + }, + "createOption": { + "$id": "4260", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4261", + "kind": "number", + "type": { + "$ref": "622" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4262", + "kind": "model", + "type": { + "$ref": "598" + }, + "value": { + "$id": "4263", + "storageAccountType": { + "$id": "4264", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4265", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "4266", + "id": { + "$id": "4267", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4268", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "4269", + "securityEncryptionType": { + "$id": "4270", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4271", + "kind": "model", + "type": { + "$ref": "601" + }, + "value": { + "$id": "4272", + "id": { + "$id": "4273", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4274", + "kind": "number", + "type": { + "$ref": "625" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4275", + "kind": "number", + "type": { + "$ref": "627" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4276", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "4277", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "4278", + "healthProbe": { + "$id": "4279", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "4280", + "id": { + "$id": "4281", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4282", + "kind": "array", + "type": { + "$ref": "638" + }, + "value": [ + { + "$id": "4283", + "kind": "model", + "type": { + "$ref": "639" + }, + "value": { + "$id": "4284", + "name": { + "$id": "4285", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "i" + }, + "properties": { + "$id": "4286", + "kind": "model", + "type": { + "$ref": "643" + }, + "value": { + "$id": "4287", + "primary": { + "$id": "4288", + "kind": "boolean", + "type": { + "$ref": "645" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4289", + "kind": "boolean", + "type": { + "$ref": "647" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4290", + "kind": "boolean", + "type": { + "$ref": "649" + }, + "value": true + }, + "enableFpga": { + "$id": "4291", + "kind": "boolean", + "type": { + "$ref": "651" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4292", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4293", + "id": { + "$id": "4294", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4295", + "kind": "model", + "type": { + "$ref": "654" + }, + "value": { + "$id": "4296", + "dnsServers": { + "$id": "4297", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "4298", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4299", + "kind": "array", + "type": { + "$ref": "659" + }, + "value": [ + { + "$id": "4300", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "4301", + "name": { + "$id": "4302", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4303", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4304", + "subnet": { + "$id": "4305", + "kind": "model", + "type": { + "$ref": "633" + }, + "value": { + "$id": "4306", + "id": { + "$id": "4307", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4308", + "kind": "boolean", + "type": { + "$ref": "667" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4309", + "kind": "model", + "type": { + "$ref": "669" + }, + "value": { + "$id": "4310", + "name": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4312", + "kind": "model", + "type": { + "$ref": "673" + }, + "value": { + "$id": "4313", + "idleTimeoutInMinutes": { + "$id": "4314", + "kind": "number", + "type": { + "$ref": "675" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4315", + "kind": "model", + "type": { + "$ref": "677" + }, + "value": { + "$id": "4316", + "domainNameLabel": { + "$id": "4317", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4319", + "kind": "array", + "type": { + "$ref": "682" + }, + "value": [ + { + "$id": "4320", + "kind": "model", + "type": { + "$ref": "683" + }, + "value": { + "$id": "4321", + "ipTagType": { + "$id": "4322", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4323", + "kind": "string", + "type": { + "$ref": "687" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4324", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4325", + "id": { + "$id": "4326", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4327", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4328", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4329", + "kind": "model", + "type": { + "$ref": "692" + }, + "value": { + "$id": "4330", + "name": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "4332", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4333", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4334", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "4335", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4336", + "id": { + "$id": "4337", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4338", + "kind": "array", + "type": { + "$ref": "699" + }, + "value": [ + { + "$id": "4339", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4340", + "id": { + "$id": "4341", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4342", + "kind": "array", + "type": { + "$ref": "701" + }, + "value": [ + { + "$id": "4343", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4344", + "id": { + "$id": "4345", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4346", + "kind": "array", + "type": { + "$ref": "703" + }, + "value": [ + { + "$id": "4347", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4348", + "id": { + "$id": "4349", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4350", + "kind": "boolean", + "type": { + "$ref": "705" + }, + "value": true + }, + "deleteOption": { + "$id": "4351", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4352", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4353", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4354", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4355", + "kind": "model", + "type": { + "$ref": "711" + }, + "value": { + "$id": "4356", + "uefiSettings": { + "$id": "4357", + "kind": "model", + "type": { + "$ref": "713" + }, + "value": { + "$id": "4358", + "secureBootEnabled": { + "$id": "4359", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4360", + "kind": "boolean", + "type": { + "$ref": "717" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4361", + "kind": "boolean", + "type": { + "$ref": "719" + }, + "value": true + }, + "securityType": { + "$id": "4362", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4363", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "4364", + "userAssignedIdentityResourceId": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4366", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "4367", + "enabled": { + "$id": "4368", + "kind": "boolean", + "type": { + "$ref": "729" + }, + "value": true + }, + "mode": { + "$id": "4369", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4370", + "kind": "number", + "type": { + "$ref": "732" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4371", + "kind": "model", + "type": { + "$ref": "734" + }, + "value": { + "$id": "4372", + "bootDiagnostics": { + "$id": "4373", + "kind": "model", + "type": { + "$ref": "736" + }, + "value": { + "$id": "4374", + "enabled": { + "$id": "4375", + "kind": "boolean", + "type": { + "$ref": "738" + }, + "value": true + }, + "storageUri": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "740" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4377", + "kind": "model", + "type": { + "$ref": "742" + }, + "value": { + "$id": "4378", + "extensions": { + "$id": "4379", + "kind": "array", + "type": { + "$ref": "744" + }, + "value": [ + { + "$id": "4380", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4381", + "name": { + "$id": "4382", + "kind": "string", + "type": { + "$ref": "750" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "4383", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "cmeam" + }, + "properties": { + "$id": "4384", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4385", + "forceUpdateTag": { + "$id": "4386", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4387", + "kind": "string", + "type": { + "$ref": "758" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4388", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4389", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4390", + "kind": "boolean", + "type": { + "$ref": "764" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4391", + "kind": "boolean", + "type": { + "$ref": "766" + }, + "value": true + }, + "settings": { + "$id": "4392", + "kind": "dict", + "type": { + "$ref": "768" + }, + "value": { + "$id": "4393" + } + }, + "provisioningState": { + "$id": "4394", + "kind": "string", + "type": { + "$ref": "776" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "4395", + "kind": "array", + "type": { + "$ref": "778" + }, + "value": [ + { + "$id": "4396", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4397", + "kind": "boolean", + "type": { + "$ref": "781" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4398", + "kind": "model", + "type": { + "$ref": "783" + }, + "value": { + "$id": "4399", + "secretUrl": { + "$id": "4400", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4401", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4402", + "id": { + "$id": "4403", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "4404", + "kind": "string", + "type": { + "$ref": "747" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4405", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4406", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4407", + "kind": "model", + "type": { + "$ref": "792" + }, + "value": { + "$id": "4408", + "terminateNotificationProfile": { + "$id": "4409", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "4410", + "notBeforeTimeout": { + "$id": "4411", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4412", + "kind": "boolean", + "type": { + "$ref": "798" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4413", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4414", + "notBeforeTimeout": { + "$id": "4415", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4416", + "kind": "boolean", + "type": { + "$ref": "804" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4417", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4418", + "kind": "model", + "type": { + "$ref": "808" + }, + "value": { + "$id": "4419", + "capacityReservationGroup": { + "$id": "4420", + "kind": "model", + "type": { + "$ref": "539" + }, + "value": { + "$id": "4421", + "id": { + "$id": "4422", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4423", + "kind": "model", + "type": { + "$ref": "811" + }, + "value": { + "$id": "4424", + "galleryApplications": { + "$id": "4425", + "kind": "array", + "type": { + "$ref": "813" + }, + "value": [ + { + "$id": "4426", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "4427", + "tags": { + "$id": "4428", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4429", + "kind": "number", + "type": { + "$ref": "818" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4430", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4431", + "kind": "boolean", + "type": { + "$ref": "825" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4432", + "kind": "boolean", + "type": { + "$ref": "827" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4433", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "4434", + "vmSizeProperties": { + "$id": "4435", + "kind": "model", + "type": { + "$ref": "831" + }, + "value": { + "$id": "4436", + "vCPUsAvailable": { + "$id": "4437", + "kind": "number", + "type": { + "$ref": "833" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4438", + "kind": "number", + "type": { + "$ref": "835" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4439", + "kind": "model", + "type": { + "$ref": "837" + }, + "value": { + "$id": "4440", + "id": { + "$id": "4441", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4442", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4443", + "id": { + "$id": "4444", + "kind": "string", + "type": { + "$ref": "844" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4445", + "kind": "array", + "type": { + "$ref": "846" + }, + "value": [ + { + "$id": "4446", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4447", + "kind": "boolean", + "type": { + "$ref": "849" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4449", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4450", + "kind": "number", + "type": { + "$ref": "859" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4451", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4452", + "kind": "string", + "type": { + "$ref": "870" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4453", + "kind": "array", + "type": { + "$ref": "872" + }, + "value": [ + { + "$id": "4454", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone1" + }, + { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4456", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4457", + "principalId": { + "$id": "4458", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4459", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4460", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4461", + "kind": "dict", + "type": { + "$ref": "884" + }, + "value": { + "$id": "4462", + "key9851": { + "$id": "4463", + "kind": "model", + "type": { + "$ref": "887" + }, + "value": { + "$id": "4464", + "principalId": { + "$id": "4465", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4466", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4467", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "4468", + "name": { + "$id": "4469", + "kind": "string", + "type": { + "$ref": "897" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4470", + "kind": "string", + "type": { + "$ref": "899" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4471", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4472", + "kind": "string", + "type": { + "$ref": "903" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4473", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4474", + "kind": "dict", + "type": { + "$ref": "376" + }, + "value": { + "$id": "4475", + "key3518": { + "$id": "4476", + "kind": "string", + "type": { + "$ref": "378" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4477", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "westus" + }, + "id": { + "$id": "4478", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4479", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "testFleet" + }, + "type": { + "$id": "4480", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4481", + "kind": "model", + "type": { + "$ref": "362" + }, + "value": { + "$id": "4482", + "createdBy": { + "$id": "4483", + "kind": "string", + "type": { + "$ref": "364" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4484", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "4485", + "kind": "string", + "type": { + "$ref": "367" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4486", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4487", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4488", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4489", + "kind": "string", + "type": { + "$ref": "965" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "4490", + "Name": "listVirtualMachineScaleSets", + "ResourceName": "VirtualMachineScaleSet", + "Description": "List VirtualMachineScaleSet resources by Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4491", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "4492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4493", + "Type": { + "$id": "4494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4495", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Description": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4496", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4498", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Description": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4500", + "Name": "name", + "NameInRequest": "name", + "Description": "The name of the Fleet", + "Type": { + "$id": "4501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4502", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4503", + "kind": "constant", + "valueType": { + "$id": "4504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4505", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "967" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets", + "BufferResponse": true, + "Paging": { + "$id": "4506", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "Decorators": [], + "Examples": [ + { + "$id": "4507", + "kind": "http", + "name": "Fleets_ListVirtualMachineScaleSets", + "description": "Fleets_ListVirtualMachineScaleSets", + "filePath": "2024-11-01/Fleets_ListVirtualMachineScaleSets.json", + "parameters": [ + { + "$id": "4508", + "parameter": { + "$ref": "4491" + }, + "value": { + "$id": "4509", + "kind": "string", + "type": { + "$ref": "4492" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4510", + "parameter": { + "$ref": "4495" + }, + "value": { + "$id": "4511", + "kind": "string", + "type": { + "$ref": "4496" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4512", + "parameter": { + "$ref": "4498" + }, + "value": { + "$id": "4513", + "kind": "string", + "type": { + "$ref": "4499" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "4514", + "parameter": { + "$ref": "4500" + }, + "value": { + "$id": "4515", + "kind": "string", + "type": { + "$ref": "4501" + }, + "value": "myFleet" + } + } + ], + "responses": [ + { + "$id": "4516", + "response": { + "$ref": "4505" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4517", + "kind": "model", + "type": { + "$ref": "967" + }, + "value": { + "$id": "4518", + "value": { + "$id": "4519", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "4520", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "4521", + "name": { + "$id": "4522", + "kind": "string", + "type": { + "$id": "4523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "myVmss" + }, + "id": { + "$id": "4524", + "kind": "string", + "type": { + "$ref": "972" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/myFleet/virtualMachineScaleSets/myVmss" + }, + "type": { + "$id": "4525", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "Microsoft.AzureFleet/fleets/virtualMachineScaleSets" + }, + "operationStatus": { + "$id": "4526", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "error": { + "$id": "4527", + "kind": "model", + "type": { + "$ref": "978" + }, + "value": { + "$id": "4528", + "details": { + "$id": "4529", + "kind": "array", + "type": { + "$ref": "986" + }, + "value": [ + { + "$id": "4530", + "kind": "model", + "type": { + "$ref": "987" + }, + "value": { + "$id": "4531", + "code": { + "$id": "4532", + "kind": "string", + "type": { + "$ref": "989" + }, + "value": "gzhtOverconstrainedAllocationRequestyosk" + }, + "target": { + "$id": "4533", + "kind": "string", + "type": { + "$ref": "991" + }, + "value": "qfthabhrmndhfizfnrwpgxvnokpy" + }, + "message": { + "$id": "4534", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "Allocation Failed" + } + } + } + ] + }, + "innererror": { + "$id": "4535", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "4536", + "exceptionType": { + "$id": "4537", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "sfaomfpoaptnbxchrfskm" + }, + "errorDetail": { + "$id": "4538", + "kind": "string", + "type": { + "$ref": "999" + }, + "value": "ihjwbwykq" + } + } + }, + "code": { + "$id": "4539", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "OverconstrainedAllocationRequest" + }, + "target": { + "$id": "4540", + "kind": "string", + "type": { + "$ref": "982" + }, + "value": "nhaj" + }, + "message": { + "$id": "4541", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "Allocation Failed" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "4542" + }, + "Parent": "AzureFleetClient", + "Parameters": [ + { + "$id": "4543", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Service host", + "Type": { + "$id": "4544", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4545", + "Type": { + "$id": "4546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "4547", + "OAuth2": { + "$id": "4548", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/computefleet/ci.mgmt.yml b/sdk/computefleet/ci.mgmt.yml index de169e18c599..58fc15347c98 100644 --- a/sdk/computefleet/ci.mgmt.yml +++ b/sdk/computefleet/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/computefleet/ci.mgmt.yml - sdk/computefleet/Azure.ResourceManager.ComputeFleet/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/computefleet/ci.mgmt.yml + - sdk/computefleet/Azure.ResourceManager.ComputeFleet/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/computeschedule/ci.mgmt.yml b/sdk/computeschedule/ci.mgmt.yml index d3a367f82551..01d026ef37ea 100644 --- a/sdk/computeschedule/ci.mgmt.yml +++ b/sdk/computeschedule/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/computeschedule/ci.mgmt.yml - sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/computeschedule/ci.mgmt.yml + - sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/confidentialledger/ci.mgmt.yml b/sdk/confidentialledger/ci.mgmt.yml index 7343d843f2ee..b61c498ed14a 100644 --- a/sdk/confidentialledger/ci.mgmt.yml +++ b/sdk/confidentialledger/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/confidentialledger/ci.mgmt.yml - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/confidentialledger/ci.mgmt.yml + - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/confluent/ci.mgmt.yml b/sdk/confluent/ci.mgmt.yml index 12d37aa41bd2..757508d306f9 100644 --- a/sdk/confluent/ci.mgmt.yml +++ b/sdk/confluent/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/confluent/ci.mgmt.yml - sdk/confluent/Azure.ResourceManager.Confluent/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/confluent/ci.mgmt.yml + - sdk/confluent/Azure.ResourceManager.Confluent/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/connectedvmwarevsphere/ci.mgmt.yml b/sdk/connectedvmwarevsphere/ci.mgmt.yml index a9d0db85cf82..f8990a206c45 100644 --- a/sdk/connectedvmwarevsphere/ci.mgmt.yml +++ b/sdk/connectedvmwarevsphere/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/connectedvmwarevsphere/ci.mgmt.yml - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/connectedvmwarevsphere/ci.mgmt.yml + - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/consumption/ci.mgmt.yml b/sdk/consumption/ci.mgmt.yml index 6b0ebe2b2fa7..ccda85ce5789 100644 --- a/sdk/consumption/ci.mgmt.yml +++ b/sdk/consumption/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/consumption/ci.mgmt.yml - sdk/consumption/Azure.ResourceManager.Consumption/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/consumption/ci.mgmt.yml + - sdk/consumption/Azure.ResourceManager.Consumption/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerapps/ci.mgmt.yml b/sdk/containerapps/ci.mgmt.yml index 7715d499fa59..69564e2f1920 100644 --- a/sdk/containerapps/ci.mgmt.yml +++ b/sdk/containerapps/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerapps/ci.mgmt.yml - sdk/containerapps/Azure.ResourceManager.AppContainers/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerapps/ci.mgmt.yml + - sdk/containerapps/Azure.ResourceManager.AppContainers/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerinstance/ci.mgmt.yml b/sdk/containerinstance/ci.mgmt.yml index 0b4d90bf6d1c..865705313c2c 100644 --- a/sdk/containerinstance/ci.mgmt.yml +++ b/sdk/containerinstance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerinstance/ci.mgmt.yml - sdk/containerinstance/Azure.ResourceManager.ContainerInstance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerinstance/ci.mgmt.yml + - sdk/containerinstance/Azure.ResourceManager.ContainerInstance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerorchestratorruntime/ci.mgmt.yml b/sdk/containerorchestratorruntime/ci.mgmt.yml index 0a036386143b..98ade1bcf8c6 100644 --- a/sdk/containerorchestratorruntime/ci.mgmt.yml +++ b/sdk/containerorchestratorruntime/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerorchestratorruntime/ci.mgmt.yml - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerorchestratorruntime/ci.mgmt.yml + - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerregistry/ci.mgmt.yml b/sdk/containerregistry/ci.mgmt.yml index e3f0cfb5bfa5..5fa9fce02790 100644 --- a/sdk/containerregistry/ci.mgmt.yml +++ b/sdk/containerregistry/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerregistry/ci.mgmt.yml - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerregistry/ci.mgmt.yml + - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerservice/ci.mgmt.yml b/sdk/containerservice/ci.mgmt.yml index 9eb58047b02e..8eb615e701f7 100644 --- a/sdk/containerservice/ci.mgmt.yml +++ b/sdk/containerservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerservice/ci.mgmt.yml - sdk/containerservice/Azure.ResourceManager.ContainerService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerservice/ci.mgmt.yml + - sdk/containerservice/Azure.ResourceManager.ContainerService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cosmosdb/ci.mgmt.yml b/sdk/cosmosdb/ci.mgmt.yml index 1eab24b3bbf9..ac1fce954c2a 100644 --- a/sdk/cosmosdb/ci.mgmt.yml +++ b/sdk/cosmosdb/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/Azure.ResourceManager.CosmosDB/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cosmosdb/ci.mgmt.yml + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cosmosdbforpostgresql/ci.mgmt.yml b/sdk/cosmosdbforpostgresql/ci.mgmt.yml index ef6098c3999f..bfe2761181a8 100644 --- a/sdk/cosmosdbforpostgresql/ci.mgmt.yml +++ b/sdk/cosmosdbforpostgresql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cosmosdbforpostgresql/ci.mgmt.yml - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cosmosdbforpostgresql/ci.mgmt.yml + - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/costmanagement/ci.mgmt.yml b/sdk/costmanagement/ci.mgmt.yml index e59280ba6be2..cee9459831fb 100644 --- a/sdk/costmanagement/ci.mgmt.yml +++ b/sdk/costmanagement/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/costmanagement/ci.mgmt.yml - sdk/costmanagement/Azure.ResourceManager.CostManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/costmanagement/ci.mgmt.yml + - sdk/costmanagement/Azure.ResourceManager.CostManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/customer-insights/ci.mgmt.yml b/sdk/customer-insights/ci.mgmt.yml index 124af418dcfa..a5d4f1a60cb5 100644 --- a/sdk/customer-insights/ci.mgmt.yml +++ b/sdk/customer-insights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/customer-insights/ci.mgmt.yml - sdk/customer-insights/Azure.ResourceManager.CustomerInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/customer-insights/ci.mgmt.yml + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/databox/ci.mgmt.yml b/sdk/databox/ci.mgmt.yml index edd63a701700..6525b0b436cc 100644 --- a/sdk/databox/ci.mgmt.yml +++ b/sdk/databox/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/databox/ci.mgmt.yml - sdk/databox/Azure.ResourceManager.DataBox/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databox/ci.mgmt.yml + - sdk/databox/Azure.ResourceManager.DataBox/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/databoxedge/ci.mgmt.yml b/sdk/databoxedge/ci.mgmt.yml index 29e3b1537c78..3cf952bd82f3 100644 --- a/sdk/databoxedge/ci.mgmt.yml +++ b/sdk/databoxedge/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/databoxedge/ci.mgmt.yml - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databoxedge/ci.mgmt.yml + - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datadog/ci.mgmt.yml b/sdk/datadog/ci.mgmt.yml index 9e9d6825d8b0..c1b66f6edb09 100644 --- a/sdk/datadog/ci.mgmt.yml +++ b/sdk/datadog/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datadog/ci.mgmt.yml - sdk/datadog/Azure.ResourceManager.Datadog/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datadog/ci.mgmt.yml + - sdk/datadog/Azure.ResourceManager.Datadog/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datafactory/ci.mgmt.yml b/sdk/datafactory/ci.mgmt.yml index 85d246a5d4e7..1f1a4ba295cd 100644 --- a/sdk/datafactory/ci.mgmt.yml +++ b/sdk/datafactory/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datafactory/ci.mgmt.yml - sdk/datafactory/Azure.ResourceManager.DataFactory/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datafactory/ci.mgmt.yml + - sdk/datafactory/Azure.ResourceManager.DataFactory/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datalake-analytics/ci.mgmt.yml b/sdk/datalake-analytics/ci.mgmt.yml index b8794cd18f9e..44823b2f9444 100644 --- a/sdk/datalake-analytics/ci.mgmt.yml +++ b/sdk/datalake-analytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datalake-analytics/ci.mgmt.yml - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datalake-analytics/ci.mgmt.yml + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datalake-store/ci.mgmt.yml b/sdk/datalake-store/ci.mgmt.yml index 469839fd3024..27295ad1c28c 100644 --- a/sdk/datalake-store/ci.mgmt.yml +++ b/sdk/datalake-store/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datalake-store/ci.mgmt.yml - sdk/datalake-store/Azure.ResourceManager.DataLakeStore/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datalake-store/ci.mgmt.yml + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datamigration/ci.mgmt.yml b/sdk/datamigration/ci.mgmt.yml index 1e64024fed17..f26452e1de48 100644 --- a/sdk/datamigration/ci.mgmt.yml +++ b/sdk/datamigration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datamigration/ci.mgmt.yml - sdk/datamigration/Azure.ResourceManager.DataMigration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datamigration/ci.mgmt.yml + - sdk/datamigration/Azure.ResourceManager.DataMigration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dataprotection/ci.mgmt.yml b/sdk/dataprotection/ci.mgmt.yml index 25637090aedb..0b74e9436cc7 100644 --- a/sdk/dataprotection/ci.mgmt.yml +++ b/sdk/dataprotection/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dataprotection/ci.mgmt.yml - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dataprotection/ci.mgmt.yml + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datashare/ci.mgmt.yml b/sdk/datashare/ci.mgmt.yml index f6dd41e0f37f..dcb3801e3f58 100644 --- a/sdk/datashare/ci.mgmt.yml +++ b/sdk/datashare/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datashare/ci.mgmt.yml - sdk/datashare/Azure.ResourceManager.DataShare/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datashare/ci.mgmt.yml + - sdk/datashare/Azure.ResourceManager.DataShare/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/defendereasm/ci.mgmt.yml b/sdk/defendereasm/ci.mgmt.yml index dd90e5a46690..2dc5c04ec007 100644 --- a/sdk/defendereasm/ci.mgmt.yml +++ b/sdk/defendereasm/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/defendereasm/ci.mgmt.yml - sdk/defendereasm/Azure.ResourceManager.DefenderEasm/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/defendereasm/ci.mgmt.yml + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/desktopvirtualization/ci.mgmt.yml b/sdk/desktopvirtualization/ci.mgmt.yml index 3d6f40025c77..b6af32cc15c3 100644 --- a/sdk/desktopvirtualization/ci.mgmt.yml +++ b/sdk/desktopvirtualization/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/desktopvirtualization/ci.mgmt.yml - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/desktopvirtualization/ci.mgmt.yml + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devcenter/ci.mgmt.yml b/sdk/devcenter/ci.mgmt.yml index 136d77bbba6d..cfa8320239dd 100644 --- a/sdk/devcenter/ci.mgmt.yml +++ b/sdk/devcenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devcenter/ci.mgmt.yml - sdk/devcenter/Azure.ResourceManager.DevCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devcenter/ci.mgmt.yml + - sdk/devcenter/Azure.ResourceManager.DevCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceprovisioningservices/ci.mgmt.yml b/sdk/deviceprovisioningservices/ci.mgmt.yml index f9c94973a324..733989d927dc 100644 --- a/sdk/deviceprovisioningservices/ci.mgmt.yml +++ b/sdk/deviceprovisioningservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceprovisioningservices/ci.mgmt.yml - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceprovisioningservices/ci.mgmt.yml + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceregistry/ci.mgmt.yml b/sdk/deviceregistry/ci.mgmt.yml index 05fffe301114..271e718d8676 100644 --- a/sdk/deviceregistry/ci.mgmt.yml +++ b/sdk/deviceregistry/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceregistry/ci.mgmt.yml - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceregistry/ci.mgmt.yml + - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceupdate/ci.mgmt.yml b/sdk/deviceupdate/ci.mgmt.yml index c1315e462bb9..d8abd00a2256 100644 --- a/sdk/deviceupdate/ci.mgmt.yml +++ b/sdk/deviceupdate/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceupdate/ci.mgmt.yml - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceupdate/ci.mgmt.yml + - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devopsinfrastructure/ci.mgmt.yml b/sdk/devopsinfrastructure/ci.mgmt.yml index 0f2db1225cf0..8e463b9f3794 100644 --- a/sdk/devopsinfrastructure/ci.mgmt.yml +++ b/sdk/devopsinfrastructure/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devopsinfrastructure/ci.mgmt.yml - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devopsinfrastructure/ci.mgmt.yml + - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devspaces/ci.mgmt.yml b/sdk/devspaces/ci.mgmt.yml index b63234a64555..248d3c3143f0 100644 --- a/sdk/devspaces/ci.mgmt.yml +++ b/sdk/devspaces/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devspaces/ci.mgmt.yml - sdk/devspaces/Azure.ResourceManager.DevSpaces/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devspaces/ci.mgmt.yml + - sdk/devspaces/Azure.ResourceManager.DevSpaces/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devtestlabs/ci.mgmt.yml b/sdk/devtestlabs/ci.mgmt.yml index 1946409a6b75..7ee994de378b 100644 --- a/sdk/devtestlabs/ci.mgmt.yml +++ b/sdk/devtestlabs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devtestlabs/ci.mgmt.yml - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devtestlabs/ci.mgmt.yml + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/digitaltwins/ci.mgmt.yml b/sdk/digitaltwins/ci.mgmt.yml index a0e8233a36cf..a8766e215b7c 100644 --- a/sdk/digitaltwins/ci.mgmt.yml +++ b/sdk/digitaltwins/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/digitaltwins/ci.mgmt.yml - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/digitaltwins/ci.mgmt.yml + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dns/ci.mgmt.yml b/sdk/dns/ci.mgmt.yml index 8357809b4e6f..ec6edfb21775 100644 --- a/sdk/dns/ci.mgmt.yml +++ b/sdk/dns/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/dns/ci.mgmt.yml - sdk/dns/Azure.ResourceManager.Dns/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dns/ci.mgmt.yml + - sdk/dns/Azure.ResourceManager.Dns/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dnsresolver/ci.mgmt.yml b/sdk/dnsresolver/ci.mgmt.yml index afa270cdc600..6b2569c11c49 100644 --- a/sdk/dnsresolver/ci.mgmt.yml +++ b/sdk/dnsresolver/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dnsresolver/ci.mgmt.yml - sdk/dnsresolver/Azure.ResourceManager.DnsResolver/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dnsresolver/ci.mgmt.yml + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dynatrace/ci.mgmt.yml b/sdk/dynatrace/ci.mgmt.yml index f76bf3a316af..fe97a3c1f612 100644 --- a/sdk/dynatrace/ci.mgmt.yml +++ b/sdk/dynatrace/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dynatrace/ci.mgmt.yml - sdk/dynatrace/Azure.ResourceManager.Dynatrace/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dynatrace/ci.mgmt.yml + - sdk/dynatrace/Azure.ResourceManager.Dynatrace/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/edgeorder/ci.mgmt.yml b/sdk/edgeorder/ci.mgmt.yml index 4d1fbaa121f9..cb4d87c29a1b 100644 --- a/sdk/edgeorder/ci.mgmt.yml +++ b/sdk/edgeorder/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/edgeorder/ci.mgmt.yml - sdk/edgeorder/Azure.ResourceManager.EdgeOrder/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/edgeorder/ci.mgmt.yml + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/edgezones/ci.mgmt.yml b/sdk/edgezones/ci.mgmt.yml index 9dc8d79aab30..ebed00842581 100644 --- a/sdk/edgezones/ci.mgmt.yml +++ b/sdk/edgezones/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/edgezones/ci.mgmt.yml - sdk/edgezones/Azure.ResourceManager.EdgeZones/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/edgezones/ci.mgmt.yml + - sdk/edgezones/Azure.ResourceManager.EdgeZones/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/elastic/ci.mgmt.yml b/sdk/elastic/ci.mgmt.yml index 76ecd8b3923d..2e29070fce4a 100644 --- a/sdk/elastic/ci.mgmt.yml +++ b/sdk/elastic/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/elastic/ci.mgmt.yml - sdk/elastic/Azure.ResourceManager.Elastic/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/elastic/ci.mgmt.yml + - sdk/elastic/Azure.ResourceManager.Elastic/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/elasticsan/ci.mgmt.yml b/sdk/elasticsan/ci.mgmt.yml index 7e2bb35dde21..dba4416415e9 100644 --- a/sdk/elasticsan/ci.mgmt.yml +++ b/sdk/elasticsan/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/elasticsan/ci.mgmt.yml - sdk/elasticsan/Azure.ResourceManager.ElasticSan/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/elasticsan/ci.mgmt.yml + - sdk/elasticsan/Azure.ResourceManager.ElasticSan/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventgrid/ci.mgmt.yml b/sdk/eventgrid/ci.mgmt.yml index cb02a1b84e8b..1b2eaffc0fdd 100644 --- a/sdk/eventgrid/ci.mgmt.yml +++ b/sdk/eventgrid/ci.mgmt.yml @@ -2,6 +2,7 @@ # This is for Track 2 managment plane SDK trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/eventgrid/ci.mgmt.yml - sdk/eventgrid/Azure.ResourceManager.EventGrid/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/eventgrid/ci.mgmt.yml + - sdk/eventgrid/Azure.ResourceManager.EventGrid/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventhub/ci.mgmt.yml b/sdk/eventhub/ci.mgmt.yml index b7c0045fffb3..dadda2db6dc5 100644 --- a/sdk/eventhub/ci.mgmt.yml +++ b/sdk/eventhub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/Azure.ResourceManager.EventHubs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/eventhub/ci.mgmt.yml + - sdk/eventhub/Azure.ResourceManager.EventHubs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/extendedlocation/ci.mgmt.yml b/sdk/extendedlocation/ci.mgmt.yml index 4fb53374be74..e9c6939e2b1d 100644 --- a/sdk/extendedlocation/ci.mgmt.yml +++ b/sdk/extendedlocation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/extendedlocation/ci.mgmt.yml - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/extendedlocation/ci.mgmt.yml + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fabric/ci.mgmt.yml b/sdk/fabric/ci.mgmt.yml index d0bc6cea6eb9..5cc91d0c8722 100644 --- a/sdk/fabric/ci.mgmt.yml +++ b/sdk/fabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fabric/ci.mgmt.yml - sdk/fabric/Azure.ResourceManager.Fabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fabric/ci.mgmt.yml + - sdk/fabric/Azure.ResourceManager.Fabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fleet/ci.mgmt.yml b/sdk/fleet/ci.mgmt.yml index 09a225882401..469d40cad619 100644 --- a/sdk/fleet/ci.mgmt.yml +++ b/sdk/fleet/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fleet/ci.mgmt.yml - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fleet/ci.mgmt.yml + - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fluidrelay/ci.mgmt.yml b/sdk/fluidrelay/ci.mgmt.yml index d43dfe94d729..1673db3a9f26 100644 --- a/sdk/fluidrelay/ci.mgmt.yml +++ b/sdk/fluidrelay/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fluidrelay/ci.mgmt.yml - sdk/fluidrelay/Azure.ResourceManager.FluidRelay/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fluidrelay/ci.mgmt.yml + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/frontdoor/ci.mgmt.yml b/sdk/frontdoor/ci.mgmt.yml index bff9dbcae78c..f19923a1b43d 100644 --- a/sdk/frontdoor/ci.mgmt.yml +++ b/sdk/frontdoor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/frontdoor/ci.mgmt.yml - sdk/frontdoor/Azure.ResourceManager.FrontDoor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/frontdoor/ci.mgmt.yml + - sdk/frontdoor/Azure.ResourceManager.FrontDoor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/grafana/ci.mgmt.yml b/sdk/grafana/ci.mgmt.yml index a2f22e6ee33b..848173351b4d 100644 --- a/sdk/grafana/ci.mgmt.yml +++ b/sdk/grafana/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/grafana/ci.mgmt.yml - sdk/grafana/Azure.ResourceManager.Grafana/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/grafana/ci.mgmt.yml + - sdk/grafana/Azure.ResourceManager.Grafana/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/graphservices/ci.mgmt.yml b/sdk/graphservices/ci.mgmt.yml index 717a9a4a1963..ccd14b614b43 100644 --- a/sdk/graphservices/ci.mgmt.yml +++ b/sdk/graphservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/graphservices/ci.mgmt.yml - sdk/graphservices/Azure.ResourceManager.GraphServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/graphservices/ci.mgmt.yml + - sdk/graphservices/Azure.ResourceManager.GraphServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/guestconfiguration/ci.mgmt.yml b/sdk/guestconfiguration/ci.mgmt.yml index 5ebc59550f58..c2d2526d488b 100644 --- a/sdk/guestconfiguration/ci.mgmt.yml +++ b/sdk/guestconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/guestconfiguration/ci.mgmt.yml - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/guestconfiguration/ci.mgmt.yml + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hardwaresecuritymodules/ci.mgmt.yml b/sdk/hardwaresecuritymodules/ci.mgmt.yml index 21778711f99e..d94eea966253 100644 --- a/sdk/hardwaresecuritymodules/ci.mgmt.yml +++ b/sdk/hardwaresecuritymodules/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hardwaresecuritymodules/ci.mgmt.yml - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hardwaresecuritymodules/ci.mgmt.yml + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hdinsight/ci.mgmt.yml b/sdk/hdinsight/ci.mgmt.yml index 4df0a02f5c80..29d3b404c76a 100644 --- a/sdk/hdinsight/ci.mgmt.yml +++ b/sdk/hdinsight/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hdinsight/ci.mgmt.yml - sdk/hdinsight/Azure.ResourceManager.HDInsight/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hdinsight/ci.mgmt.yml + - sdk/hdinsight/Azure.ResourceManager.HDInsight/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hdinsightcontainers/ci.mgmt.yml b/sdk/hdinsightcontainers/ci.mgmt.yml index 69a7566e0caa..66a879d8fbcd 100644 --- a/sdk/hdinsightcontainers/ci.mgmt.yml +++ b/sdk/hdinsightcontainers/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hdinsightcontainers/ci.mgmt.yml - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hdinsightcontainers/ci.mgmt.yml + - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthbot/ci.mgmt.yml b/sdk/healthbot/ci.mgmt.yml index 14bfc7f855e6..4c2698659502 100644 --- a/sdk/healthbot/ci.mgmt.yml +++ b/sdk/healthbot/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthbot/ci.mgmt.yml - sdk/healthbot/Azure.ResourceManager.HealthBot/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthbot/ci.mgmt.yml + - sdk/healthbot/Azure.ResourceManager.HealthBot/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthcareapis/ci.mgmt.yml b/sdk/healthcareapis/ci.mgmt.yml index 57030df35e56..6f02ac8fd023 100644 --- a/sdk/healthcareapis/ci.mgmt.yml +++ b/sdk/healthcareapis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthcareapis/ci.mgmt.yml - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthcareapis/ci.mgmt.yml + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthdataaiservices/ci.mgmt.yml b/sdk/healthdataaiservices/ci.mgmt.yml index 016a917c1e19..45857afa5722 100644 --- a/sdk/healthdataaiservices/ci.mgmt.yml +++ b/sdk/healthdataaiservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthdataaiservices/ci.mgmt.yml - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthdataaiservices/ci.mgmt.yml + - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridaks/ci.mgmt.yml b/sdk/hybridaks/ci.mgmt.yml index 552eb3298d3a..af3d82703d11 100644 --- a/sdk/hybridaks/ci.mgmt.yml +++ b/sdk/hybridaks/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridaks/ci.mgmt.yml - sdk/hybridaks/Azure.ResourceManager.HybridContainerService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridaks/ci.mgmt.yml + - sdk/hybridaks/Azure.ResourceManager.HybridContainerService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridcompute/ci.mgmt.yml b/sdk/hybridcompute/ci.mgmt.yml index d163a966512d..15f8656c399e 100644 --- a/sdk/hybridcompute/ci.mgmt.yml +++ b/sdk/hybridcompute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridcompute/ci.mgmt.yml - sdk/hybridcompute/Azure.ResourceManager.HybridCompute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridcompute/ci.mgmt.yml + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridconnectivity/ci.mgmt.yml b/sdk/hybridconnectivity/ci.mgmt.yml index 9ccca42ef557..8d809d4d9633 100644 --- a/sdk/hybridconnectivity/ci.mgmt.yml +++ b/sdk/hybridconnectivity/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridconnectivity/ci.mgmt.yml - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridconnectivity/ci.mgmt.yml + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridkubernetes/ci.mgmt.yml b/sdk/hybridkubernetes/ci.mgmt.yml index fff768430c9d..bb98635a8e1c 100644 --- a/sdk/hybridkubernetes/ci.mgmt.yml +++ b/sdk/hybridkubernetes/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridkubernetes/ci.mgmt.yml - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridkubernetes/ci.mgmt.yml + - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridnetwork/ci.mgmt.yml b/sdk/hybridnetwork/ci.mgmt.yml index 35f71f8ae870..39412ff81f05 100644 --- a/sdk/hybridnetwork/ci.mgmt.yml +++ b/sdk/hybridnetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridnetwork/ci.mgmt.yml - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridnetwork/ci.mgmt.yml + - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/informaticadatamanagement/ci.mgmt.yml b/sdk/informaticadatamanagement/ci.mgmt.yml index 03013cc9c90b..82d3bafd3f7f 100644 --- a/sdk/informaticadatamanagement/ci.mgmt.yml +++ b/sdk/informaticadatamanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/informaticadatamanagement/ci.mgmt.yml - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/informaticadatamanagement/ci.mgmt.yml + - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iot/ci.mgmt.yml b/sdk/iot/ci.mgmt.yml index 6260cd0d71f2..199578b03331 100644 --- a/sdk/iot/ci.mgmt.yml +++ b/sdk/iot/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iot/ci.mgmt.yml - sdk/iot/Azure.ResourceManager.IotFirmwareDefense/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iot/ci.mgmt.yml + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iotcentral/ci.mgmt.yml b/sdk/iotcentral/ci.mgmt.yml index 1702fd71c6dd..1225f99c37fd 100644 --- a/sdk/iotcentral/ci.mgmt.yml +++ b/sdk/iotcentral/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iotcentral/ci.mgmt.yml - sdk/iotcentral/Azure.ResourceManager.IotCentral/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iotcentral/ci.mgmt.yml + - sdk/iotcentral/Azure.ResourceManager.IotCentral/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iothub/ci.mgmt.yml b/sdk/iothub/ci.mgmt.yml index 5eb9e999a89c..63fb10994eac 100644 --- a/sdk/iothub/ci.mgmt.yml +++ b/sdk/iothub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iothub/ci.mgmt.yml - sdk/iothub/Azure.ResourceManager.IotHub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iothub/ci.mgmt.yml + - sdk/iothub/Azure.ResourceManager.IotHub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/keyvault/ci.mgmt.yml b/sdk/keyvault/ci.mgmt.yml index b48c2f8d4ff4..8ad905079a0a 100644 --- a/sdk/keyvault/ci.mgmt.yml +++ b/sdk/keyvault/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/keyvault/ci.mgmt.yml - sdk/keyvault/Azure.ResourceManager.KeyVault/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/keyvault/ci.mgmt.yml + - sdk/keyvault/Azure.ResourceManager.KeyVault/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/kubernetesconfiguration/ci.mgmt.yml b/sdk/kubernetesconfiguration/ci.mgmt.yml index 4249ef57fa6e..d3fb470a7b6e 100644 --- a/sdk/kubernetesconfiguration/ci.mgmt.yml +++ b/sdk/kubernetesconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/kubernetesconfiguration/ci.mgmt.yml - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/kubernetesconfiguration/ci.mgmt.yml + - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/kusto/ci.mgmt.yml b/sdk/kusto/ci.mgmt.yml index 374cf1f0cb81..c410d1487d18 100644 --- a/sdk/kusto/ci.mgmt.yml +++ b/sdk/kusto/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/kusto/ci.mgmt.yml - sdk/kusto/Azure.ResourceManager.Kusto/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/kusto/ci.mgmt.yml + - sdk/kusto/Azure.ResourceManager.Kusto/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/labservices/ci.mgmt.yml b/sdk/labservices/ci.mgmt.yml index 48f80379ab14..f8a982072965 100644 --- a/sdk/labservices/ci.mgmt.yml +++ b/sdk/labservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/labservices/ci.mgmt.yml - sdk/labservices/Azure.ResourceManager.LabServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/labservices/ci.mgmt.yml + - sdk/labservices/Azure.ResourceManager.LabServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/Configuration.json b/sdk/loadtesting/Azure.Developer.LoadTesting/Configuration.json new file mode 100644 index 000000000000..b3f1de09d2b8 --- /dev/null +++ b/sdk/loadtesting/Azure.Developer.LoadTesting/Configuration.json @@ -0,0 +1,11 @@ +{ + "output-folder": ".", + "namespace": "Azure.Developer.LoadTesting", + "library-name": "Azure.Developer.LoadTesting", + "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" + ] +} diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/tsp-location.yaml b/sdk/loadtesting/Azure.Developer.LoadTesting/tsp-location.yaml new file mode 100644 index 000000000000..e24a815f501f --- /dev/null +++ b/sdk/loadtesting/Azure.Developer.LoadTesting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/loadtestservice/LoadTestService +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/loadtesting/Azure.Developer.LoadTesting/tspCodeModel.json b/sdk/loadtesting/Azure.Developer.LoadTesting/tspCodeModel.json new file mode 100644 index 000000000000..a3e4c82e0f98 --- /dev/null +++ b/sdk/loadtesting/Azure.Developer.LoadTesting/tspCodeModel.json @@ -0,0 +1,31930 @@ +{ + "$id": "1", + "Name": "Microsoft.LoadTestService", + "ApiVersions": [ + "2022-11-01", + "2023-04-01-preview", + "2024-03-01-preview", + "2024-05-01-preview", + "2024-07-01-preview", + "2024-12-01-preview" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "PFMetrics", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PFMetrics", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "response_time_ms", + "value": "response_time_ms", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Pass fail criteria for response time metric in milliseconds.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "latency", + "value": "latency", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Pass fail criteria for latency metric in milliseconds.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "error", + "value": "error", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Pass fail criteria for error metric.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "requests", + "value": "requests", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Pass fail criteria for total requests.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "requests_per_sec", + "value": "requests_per_sec", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Pass fail criteria for request per second.", + "decorators": [] + } + ], + "description": "Metrics for pass/fail criteria.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "PFAgFunc", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PFAgFunc", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "count", + "value": "count", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for count value.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "percentage", + "value": "percentage", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for given percentage value.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "avg", + "value": "avg", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for avg value.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "p50", + "value": "p50", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 50th percentile value.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "p75", + "value": "p75", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 75th percentile value.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "p90", + "value": "p90", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 90th percentile value.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "p95", + "value": "p95", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 95th percentile value.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "p96", + "value": "p96", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 96th percentile value.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "p97", + "value": "p97", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 97th percentile value.", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "p98", + "value": "p98", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 98th percentile value.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "p99", + "value": "p99", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 99th percentile value.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "p99.9", + "value": "p99.9", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 99.9th percentile value.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "p99.99", + "value": "p99.99", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for 99.99th percentile value.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "min", + "value": "min", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for minimum value.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "max", + "value": "max", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "description": "Criteria applies for maximum value.", + "decorators": [] + } + ], + "description": "Aggregation functions for pass/fail criteria.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "46", + "kind": "enum", + "name": "PFAction", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PFAction", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "48", + "kind": "enumvalue", + "name": "continue", + "value": "continue", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "description": "Test will continue to run even if pass fail metric criteria metric gets failed.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "stop", + "value": "stop", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "description": "Test run will stop if pass fail criteria metric is not passed.", + "decorators": [] + } + ], + "description": "Action to take on failure of pass/fail criteria.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "PFResult", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PFResult", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "passed", + "value": "passed", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "description": "Given pass fail criteria metric has passed.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "undetermined", + "value": "undetermined", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "description": "Given pass fail criteria metric couldn't determine.", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "failed", + "value": "failed", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "description": "Given pass fail criteria metric has failed.", + "decorators": [] + } + ], + "description": "Pass/fail criteria result.", + "isFixed": false, + "isFlags": false, + "usage": "Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "SecretType", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.SecretType", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "AKV_SECRET_URI", + "value": "AKV_SECRET_URI", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "description": "If the secret is stored in an Azure Key Vault.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "SECRET_VALUE", + "value": "SECRET_VALUE", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "description": "If the secret value provided as plain text.", + "decorators": [] + } + ], + "description": "Types of secrets supported.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "CertificateType", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.CertificateType", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "AKV_CERT_URI", + "value": "AKV_CERT_URI", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "description": "If the certificate is stored in an Azure Key Vault.", + "decorators": [] + } + ], + "description": "Types of certificates supported.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "70", + "kind": "enum", + "name": "FileType", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FileType", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "72", + "kind": "enumvalue", + "name": "JMX_FILE", + "value": "JMX_FILE", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "description": "If the file is a JMX script.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "USER_PROPERTIES", + "value": "USER_PROPERTIES", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "description": "If the file is a user properties file.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "ADDITIONAL_ARTIFACTS", + "value": "ADDITIONAL_ARTIFACTS", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "description": "If the file is not among any of the other supported file types.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "ZIPPED_ARTIFACTS", + "value": "ZIPPED_ARTIFACTS", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "description": "If the file is a compressed archive containing a collection of various artifacts or resources.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "URL_TEST_CONFIG", + "value": "URL_TEST_CONFIG", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "description": "If the file is a JSON config file to define the requests for a URL test.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "TEST_SCRIPT", + "value": "TEST_SCRIPT", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "description": "If the file is a test script.", + "decorators": [] + } + ], + "description": "Types of file supported.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "84", + "kind": "enum", + "name": "FileStatus", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FileStatus", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "86", + "kind": "enumvalue", + "name": "NOT_VALIDATED", + "value": "NOT_VALIDATED", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "description": "File is not validated.", + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "VALIDATION_SUCCESS", + "value": "VALIDATION_SUCCESS", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "description": "File is validated.", + "decorators": [] + }, + { + "$id": "90", + "kind": "enumvalue", + "name": "VALIDATION_FAILURE", + "value": "VALIDATION_FAILURE", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "description": "File validation is failed.", + "decorators": [] + }, + { + "$id": "92", + "kind": "enumvalue", + "name": "VALIDATION_INITIATED", + "value": "VALIDATION_INITIATED", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "description": "File validation is in progress.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "VALIDATION_NOT_REQUIRED", + "value": "VALIDATION_NOT_REQUIRED", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "84" + }, + "description": "Validation is not required.", + "decorators": [] + } + ], + "description": "File status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "96", + "kind": "enum", + "name": "TestKind", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestKind", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "98", + "kind": "enumvalue", + "name": "URL", + "value": "URL", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "96" + }, + "description": "URL Test", + "decorators": [] + }, + { + "$id": "100", + "kind": "enumvalue", + "name": "JMX", + "value": "JMX", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "96" + }, + "description": "JMX Test", + "decorators": [] + }, + { + "$id": "102", + "kind": "enumvalue", + "name": "Locust", + "value": "Locust", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "96" + }, + "description": "Locust Test", + "decorators": [] + } + ], + "description": "Test kind", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "104", + "kind": "enum", + "name": "ManagedIdentityType", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ManagedIdentityType", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "106", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "description": "System-assigned managed identity.", + "decorators": [] + }, + { + "$id": "108", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "description": "User-assigned managed identity.", + "decorators": [] + } + ], + "description": "Managed identity type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "110", + "kind": "enum", + "name": "APIVersions", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.APIVersions", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "112", + "kind": "enumvalue", + "name": "v2022_11_01", + "value": "2022-11-01", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The 2022-11-01 version of the Azure Load Testing API.", + "decorators": [] + }, + { + "$id": "114", + "kind": "enumvalue", + "name": "v2023_04_01_preview", + "value": "2023-04-01-preview", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The 2023-04-01-preview version of the Azure Load Testing API.", + "decorators": [] + }, + { + "$id": "116", + "kind": "enumvalue", + "name": "v2024_03_01_preview", + "value": "2024-03-01-preview", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The 2024-03-01-preview version of the Azure Load Testing API.", + "decorators": [] + }, + { + "$id": "118", + "kind": "enumvalue", + "name": "v2024_05_01_preview", + "value": "2024-05-01-preview", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The 2024-05-01-preview version of the Azure Load Testing API.", + "decorators": [] + }, + { + "$id": "120", + "kind": "enumvalue", + "name": "v2024_07_01_preview", + "value": "2024-07-01-preview", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The 2024-07-01-preview version of the Azure Load Testing API.", + "decorators": [] + }, + { + "$id": "122", + "kind": "enumvalue", + "name": "v2024_12_01_preview", + "value": "2024-12-01-preview", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "description": "The 2024-12-01-preview version of the Azure Load Testing API.", + "decorators": [] + } + ], + "description": "Azure Load Testing API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "PFTestResult", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PFTestResult", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "PASSED", + "value": "PASSED", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "Pass/fail criteria has passed.", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "NOT_APPLICABLE", + "value": "NOT_APPLICABLE", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "Pass/fail criteria is not applicable.", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "FAILED", + "value": "FAILED", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "description": "Pass/fail criteria has failed.", + "decorators": [] + } + ], + "description": "Test result based on pass/fail criteria.", + "isFixed": false, + "isFlags": false, + "usage": "Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "132", + "kind": "enum", + "name": "Status", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Status", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "134", + "kind": "enumvalue", + "name": "ACCEPTED", + "value": "ACCEPTED", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run request is accepted.", + "decorators": [] + }, + { + "$id": "136", + "kind": "enumvalue", + "name": "NOTSTARTED", + "value": "NOTSTARTED", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is not yet started.", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "PROVISIONING", + "value": "PROVISIONING", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is provisioning.", + "decorators": [] + }, + { + "$id": "140", + "kind": "enumvalue", + "name": "PROVISIONED", + "value": "PROVISIONED", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is provisioned.", + "decorators": [] + }, + { + "$id": "142", + "kind": "enumvalue", + "name": "CONFIGURING", + "value": "CONFIGURING", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is getting configured.", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "CONFIGURED", + "value": "CONFIGURED", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run configuration is done.", + "decorators": [] + }, + { + "$id": "146", + "kind": "enumvalue", + "name": "EXECUTING", + "value": "EXECUTING", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run has started executing.", + "decorators": [] + }, + { + "$id": "148", + "kind": "enumvalue", + "name": "EXECUTED", + "value": "EXECUTED", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run execution is completed.", + "decorators": [] + }, + { + "$id": "150", + "kind": "enumvalue", + "name": "DEPROVISIONING", + "value": "DEPROVISIONING", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is getting deprovisioned.", + "decorators": [] + }, + { + "$id": "152", + "kind": "enumvalue", + "name": "DEPROVISIONED", + "value": "DEPROVISIONED", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is deprovisioned.", + "decorators": [] + }, + { + "$id": "154", + "kind": "enumvalue", + "name": "DONE", + "value": "DONE", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is completed.", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "CANCELLING", + "value": "CANCELLING", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run is being cancelled.", + "decorators": [] + }, + { + "$id": "158", + "kind": "enumvalue", + "name": "CANCELLED", + "value": "CANCELLED", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run request is cancelled.", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "FAILED", + "value": "FAILED", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run request is failed.", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "VALIDATION_SUCCESS", + "value": "VALIDATION_SUCCESS", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run JMX file is validated.", + "decorators": [] + }, + { + "$id": "164", + "kind": "enumvalue", + "name": "VALIDATION_FAILURE", + "value": "VALIDATION_FAILURE", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "132" + }, + "description": "Test run JMX file validation is failed.", + "decorators": [] + } + ], + "description": "Test run status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "166", + "kind": "enum", + "name": "RequestDataLevel", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.RequestDataLevel", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "168", + "kind": "enumvalue", + "name": "NONE", + "value": "NONE", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "166" + }, + "description": "No request data will be collected", + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "ERRORS", + "value": "ERRORS", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "166" + }, + "description": "Request data will be collected in case of failed requests", + "decorators": [] + } + ], + "description": "Request data collection level for test run", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "172", + "kind": "enum", + "name": "CreateByTypes", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.CreateByTypes", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "174", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "172" + }, + "description": "Entity was created by a user.", + "decorators": [] + }, + { + "$id": "176", + "kind": "enumvalue", + "name": "ScheduledTrigger", + "value": "ScheduledTrigger", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "172" + }, + "description": "Entity was created by a scheduled trigger.", + "decorators": [] + } + ], + "description": "The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "178", + "kind": "enum", + "name": "TimeGrain", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TimeGrain", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "180", + "kind": "enumvalue", + "name": "PT5S", + "value": "PT5S", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "178" + }, + "description": "5 seconds, available only if test run duration is less than 10 minutes.", + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "PT10S", + "value": "PT10S", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "178" + }, + "description": "10 seconds, available only if test run duration is less than 10 minutes.", + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "PT1M", + "value": "PT1M", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "178" + }, + "description": "1 minute", + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "PT5M", + "value": "PT5M", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "178" + }, + "description": "5 minutes, available only if test run duration is greater than 1 minute.", + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "PT1H", + "value": "PT1H", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "178" + }, + "description": "1 hour, available only if test run duration is greater than 1 minute.", + "decorators": [] + } + ], + "description": "Time Grain", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "190", + "kind": "enum", + "name": "AggregationType", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AggregationType", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "192", + "kind": "enumvalue", + "name": "Average", + "value": "Average", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "Average value.", + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "Count", + "value": "Count", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "Total count.", + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "Aggregation will be average in this case.", + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "Total", + "value": "Total", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "Total sum.", + "decorators": [] + }, + { + "$id": "200", + "kind": "enumvalue", + "name": "Percentile75", + "value": "Percentile75", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "75th percentile.", + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "Percentile90", + "value": "Percentile90", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "90th percentile.", + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "Percentile95", + "value": "Percentile95", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "95th percentile.", + "decorators": [] + }, + { + "$id": "206", + "kind": "enumvalue", + "name": "Percentile96", + "value": "Percentile96", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "96th percentile.", + "decorators": [] + }, + { + "$id": "208", + "kind": "enumvalue", + "name": "Percentile97", + "value": "Percentile97", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "97th percentile.", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "Percentile98", + "value": "Percentile98", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "98th percentile.", + "decorators": [] + }, + { + "$id": "212", + "kind": "enumvalue", + "name": "Percentile99", + "value": "Percentile99", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "99th percentile.", + "decorators": [] + }, + { + "$id": "214", + "kind": "enumvalue", + "name": "Percentile999", + "value": "Percentile999", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "99.9th percentile.", + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "Percentile9999", + "value": "Percentile9999", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "description": "99.99th percentile.", + "decorators": [] + } + ], + "description": "Aggregation type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "218", + "kind": "enum", + "name": "MetricUnit", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricUnit", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "220", + "kind": "enumvalue", + "name": "NotSpecified", + "value": "NotSpecified", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "No unit specified.", + "decorators": [] + }, + { + "$id": "222", + "kind": "enumvalue", + "name": "Percent", + "value": "Percent", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Percentage.", + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "Count", + "value": "Count", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Value count.", + "decorators": [] + }, + { + "$id": "226", + "kind": "enumvalue", + "name": "Seconds", + "value": "Seconds", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Seconds.", + "decorators": [] + }, + { + "$id": "228", + "kind": "enumvalue", + "name": "Milliseconds", + "value": "Milliseconds", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Milliseconds", + "decorators": [] + }, + { + "$id": "230", + "kind": "enumvalue", + "name": "Bytes", + "value": "Bytes", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Bytes", + "decorators": [] + }, + { + "$id": "232", + "kind": "enumvalue", + "name": "BytesPerSecond", + "value": "BytesPerSecond", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Bytes per second", + "decorators": [] + }, + { + "$id": "234", + "kind": "enumvalue", + "name": "CountPerSecond", + "value": "CountPerSecond", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "description": "Count per second", + "decorators": [] + } + ], + "description": "Metric unit.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "236", + "kind": "enum", + "name": "ResourceKind", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceKind", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "238", + "kind": "enumvalue", + "name": "FunctionsFlexConsumption", + "value": "FunctionsFlexConsumption", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "description": "Resource is a Azure FunctionApp on Flex Consumption Plan.", + "decorators": [] + } + ], + "description": "Kind of the resource on which test profile is created.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "240", + "kind": "enum", + "name": "TestProfileRunStatus", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRunStatus", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "242", + "kind": "enumvalue", + "name": "ACCEPTED", + "value": "ACCEPTED", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run request is accepted.", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "NOTSTARTED", + "value": "NOTSTARTED", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run is not yet started.", + "decorators": [] + }, + { + "$id": "246", + "kind": "enumvalue", + "name": "EXECUTING", + "value": "EXECUTING", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run has started executing.", + "decorators": [] + }, + { + "$id": "248", + "kind": "enumvalue", + "name": "DONE", + "value": "DONE", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run has completed successfully.", + "decorators": [] + }, + { + "$id": "250", + "kind": "enumvalue", + "name": "CANCELLING", + "value": "CANCELLING", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run is being cancelled.", + "decorators": [] + }, + { + "$id": "252", + "kind": "enumvalue", + "name": "CANCELLED", + "value": "CANCELLED", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run is cancelled.", + "decorators": [] + }, + { + "$id": "254", + "kind": "enumvalue", + "name": "FAILED", + "value": "FAILED", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "240" + }, + "description": "Test profile run has failed.", + "decorators": [] + } + ], + "description": "Test profile run status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,JsonMergePatch,Json", + "decorators": [] + }, + { + "$id": "256", + "kind": "enum", + "name": "RecommendationCategory", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.RecommendationCategory", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "258", + "kind": "enumvalue", + "name": "ThroughputOptimized", + "value": "ThroughputOptimized", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "256" + }, + "description": "The recommendation for this category optimizes the throughput/RPS (Requests per Second) of the app.", + "decorators": [] + }, + { + "$id": "260", + "kind": "enumvalue", + "name": "CostOptimized", + "value": "CostOptimized", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "256" + }, + "description": "The recommendation for this category optimizes the cost of the app.", + "decorators": [] + } + ], + "description": "Category of Recommendation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,JsonMergePatch,Json", + "decorators": [] + } + ], + "Models": [ + { + "$id": "262", + "kind": "model", + "name": "Test", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Load test model.", + "decorators": [], + "properties": [ + { + "$id": "263", + "kind": "property", + "name": "passFailCriteria", + "serializedName": "passFailCriteria", + "description": "Pass fail criteria for a test.", + "type": { + "$id": "264", + "kind": "model", + "name": "PassFailCriteria", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailCriteria", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Pass fail criteria for a test.", + "decorators": [], + "properties": [ + { + "$id": "265", + "kind": "property", + "name": "passFailMetrics", + "serializedName": "passFailMetrics", + "description": "Map of id and pass fail metrics { id : pass fail metrics }.", + "type": { + "$id": "266", + "kind": "dict", + "keyType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "268", + "kind": "model", + "name": "PassFailMetric", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Pass fail metric", + "decorators": [], + "properties": [ + { + "$id": "269", + "kind": "property", + "name": "clientMetric", + "serializedName": "clientMetric", + "description": "The client metric on which the criteria should be applied.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.clientMetric" + }, + { + "$id": "270", + "kind": "property", + "name": "aggregate", + "serializedName": "aggregate", + "description": "The aggregation function to be applied on the client metric. Allowed functions\n- ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’,\n‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec,\n‘count’ - for requests", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.aggregate" + }, + { + "$id": "271", + "kind": "property", + "name": "condition", + "serializedName": "condition", + "description": "The comparison operator. Supported types ‘>’, ‘<’ ", + "type": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.condition" + }, + { + "$id": "273", + "kind": "property", + "name": "requestName", + "serializedName": "requestName", + "description": "Request name for which the Pass fail criteria has to be applied ", + "type": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.requestName" + }, + { + "$id": "275", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The value to compare with the client metric. Allowed values - ‘error : [0.0 ,\n100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.", + "type": { + "$id": "276", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.value" + }, + { + "$id": "277", + "kind": "property", + "name": "action", + "serializedName": "action", + "description": "Action taken after the threshold is met. Default is ‘continue’.", + "type": { + "$ref": "46" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.action" + }, + { + "$id": "278", + "kind": "property", + "name": "actualValue", + "serializedName": "actualValue", + "description": "The actual value of the client metric for the test run.", + "type": { + "$id": "279", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.actualValue" + }, + { + "$id": "280", + "kind": "property", + "name": "result", + "serializedName": "result", + "description": "Outcome of the test run.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailMetric.result" + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailCriteria.passFailMetrics" + }, + { + "$id": "281", + "kind": "property", + "name": "passFailServerMetrics", + "serializedName": "passFailServerMetrics", + "description": "Map of id and pass fail server metrics { id : pass fail metrics }.", + "type": { + "$id": "282", + "kind": "dict", + "keyType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "284", + "kind": "model", + "name": "PassFailServerMetric", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Pass fail server metric", + "decorators": [], + "properties": [ + { + "$id": "285", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "description": "The resource id of the resource emitting the metric.", + "type": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.resourceId" + }, + { + "$id": "287", + "kind": "property", + "name": "metricNamespace", + "serializedName": "metricNamespace", + "description": "The server metric namespace.", + "type": { + "$id": "288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.metricNamespace" + }, + { + "$id": "289", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "description": "The server metric name.", + "type": { + "$id": "290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.metricName" + }, + { + "$id": "291", + "kind": "property", + "name": "aggregation", + "serializedName": "aggregation", + "description": "Aggregation Type", + "type": { + "$id": "292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.aggregation" + }, + { + "$id": "293", + "kind": "property", + "name": "condition", + "serializedName": "condition", + "description": "The comparison operator. Supported types ‘>’, ‘<’ ", + "type": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.condition" + }, + { + "$id": "295", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The value to compare with the server metric.", + "type": { + "$id": "296", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.value" + }, + { + "$id": "297", + "kind": "property", + "name": "action", + "serializedName": "action", + "description": "Action taken after the threshold is met. Default is ‘continue’.", + "type": { + "$ref": "46" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.action" + }, + { + "$id": "298", + "kind": "property", + "name": "actualValue", + "serializedName": "actualValue", + "description": "The actual value of the server metric ", + "type": { + "$id": "299", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.actualValue" + }, + { + "$id": "300", + "kind": "property", + "name": "result", + "serializedName": "result", + "description": "Outcome of the test run.", + "type": { + "$ref": "52" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailServerMetric.result" + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.PassFailCriteria.passFailServerMetrics" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.passFailCriteria" + }, + { + "$id": "301", + "kind": "property", + "name": "autoStopCriteria", + "serializedName": "autoStopCriteria", + "description": "Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.", + "type": { + "$id": "302", + "kind": "model", + "name": "AutoStopCriteria", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AutoStopCriteria", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.", + "decorators": [], + "properties": [ + { + "$id": "303", + "kind": "property", + "name": "autoStopDisabled", + "serializedName": "autoStopDisabled", + "description": "Whether auto-stop should be disabled. The default value is false.", + "type": { + "$id": "304", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AutoStopCriteria.autoStopDisabled" + }, + { + "$id": "305", + "kind": "property", + "name": "errorRate", + "serializedName": "errorRate", + "description": "Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0", + "type": { + "$id": "306", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AutoStopCriteria.errorRate" + }, + { + "$id": "307", + "kind": "property", + "name": "errorRateTimeWindowInSeconds", + "serializedName": "errorRateTimeWindowInSeconds", + "description": "Time window during which the error percentage should be evaluated in seconds.", + "type": { + "$id": "308", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AutoStopCriteria.errorRateTimeWindowInSeconds" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.autoStopCriteria" + }, + { + "$id": "309", + "kind": "property", + "name": "secrets", + "serializedName": "secrets", + "description": "Secrets can be stored in an Azure Key Vault or any other secret store. If the\nsecret is stored in an Azure Key Vault, the value should be the secret\nidentifier and the type should be AKV_SECRET_URI. If the secret is stored\nelsewhere, the secret value should be provided directly and the type should be\nSECRET_VALUE.", + "type": { + "$id": "310", + "kind": "dict", + "keyType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "312", + "kind": "model", + "name": "Secret", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Secret", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Secret", + "decorators": [], + "properties": [ + { + "$id": "313", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The value of the secret for the respective type", + "type": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Secret.value" + }, + { + "$id": "315", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Type of secret", + "type": { + "$ref": "60" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Secret.type" + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.secrets" + }, + { + "$id": "316", + "kind": "property", + "name": "certificate", + "serializedName": "certificate", + "description": "Certificates metadata.", + "type": { + "$id": "317", + "kind": "model", + "name": "CertificateMetadata", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.CertificateMetadata", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Certificates metadata", + "decorators": [], + "properties": [ + { + "$id": "318", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The value of the certificate for respective type", + "type": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.CertificateMetadata.value" + }, + { + "$id": "320", + "kind": "property", + "name": "type", + "serializedName": "type", + "description": "Type of certificate", + "type": { + "$ref": "66" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.CertificateMetadata.type" + }, + { + "$id": "321", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "Name of the certificate.", + "type": { + "$id": "322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.CertificateMetadata.name" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.certificate" + }, + { + "$id": "323", + "kind": "property", + "name": "environmentVariables", + "serializedName": "environmentVariables", + "description": "Environment variables which are defined as a set of pairs.", + "type": { + "$id": "324", + "kind": "dict", + "keyType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.environmentVariables" + }, + { + "$id": "327", + "kind": "property", + "name": "loadTestConfiguration", + "serializedName": "loadTestConfiguration", + "description": "The load test configuration.", + "type": { + "$id": "328", + "kind": "model", + "name": "LoadTestConfiguration", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.LoadTestConfiguration", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Configurations for the load test.", + "decorators": [], + "properties": [ + { + "$id": "329", + "kind": "property", + "name": "engineInstances", + "serializedName": "engineInstances", + "description": "The number of engine instances to execute load test. Supported values are in range of 1-400. Required for creating a new test.", + "type": { + "$id": "330", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.LoadTestConfiguration.engineInstances" + }, + { + "$id": "331", + "kind": "property", + "name": "splitAllCSVs", + "serializedName": "splitAllCSVs", + "description": "If false, Azure Load Testing copies and processes your input files unmodified\nacross all test engine instances. If true, Azure Load Testing splits the CSV\ninput data evenly across all engine instances. If you provide multiple CSV\nfiles, each file will be split evenly.", + "type": { + "$id": "332", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.LoadTestConfiguration.splitAllCSVs" + }, + { + "$id": "333", + "kind": "property", + "name": "quickStartTest", + "serializedName": "quickStartTest", + "description": "If true, optionalLoadTestConfig is required and JMX script for the load test is\nnot required to upload.", + "type": { + "$id": "334", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.LoadTestConfiguration.quickStartTest" + }, + { + "$id": "335", + "kind": "property", + "name": "optionalLoadTestConfig", + "serializedName": "optionalLoadTestConfig", + "description": "Configuration for quick load test", + "type": { + "$id": "336", + "kind": "model", + "name": "OptionalLoadTestConfig", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Configuration for quick load test", + "decorators": [], + "properties": [ + { + "$id": "337", + "kind": "property", + "name": "endpointUrl", + "serializedName": "endpointUrl", + "description": "Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login", + "type": { + "$id": "338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig.endpointUrl" + }, + { + "$id": "339", + "kind": "property", + "name": "requestsPerSecond", + "serializedName": "requestsPerSecond", + "description": "Target throughput (requests per second). This may not be necessarily achieved. The actual throughput will be lower if the application is not capable of handling it.", + "type": { + "$id": "340", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig.requestsPerSecond" + }, + { + "$id": "341", + "kind": "property", + "name": "maxResponseTimeInMs", + "serializedName": "maxResponseTimeInMs", + "description": "Maximum response time in milliseconds of the API/endpoint.", + "type": { + "$id": "342", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig.maxResponseTimeInMs" + }, + { + "$id": "343", + "kind": "property", + "name": "virtualUsers", + "serializedName": "virtualUsers", + "description": "No of concurrent virtual users.", + "type": { + "$id": "344", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig.virtualUsers" + }, + { + "$id": "345", + "kind": "property", + "name": "rampUpTime", + "serializedName": "rampUpTime", + "description": "Ramp up time in seconds.", + "type": { + "$id": "346", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig.rampUpTime" + }, + { + "$id": "347", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "Test run duration in seconds.", + "type": { + "$id": "348", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.OptionalLoadTestConfig.duration" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.LoadTestConfiguration.optionalLoadTestConfig" + }, + { + "$id": "349", + "kind": "property", + "name": "regionalLoadTestConfig", + "serializedName": "regionalLoadTestConfig", + "description": "Region distribution configuration for the load test.", + "type": { + "$id": "350", + "kind": "array", + "name": "ArrayRegionalConfiguration", + "valueType": { + "$id": "351", + "kind": "model", + "name": "RegionalConfiguration", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.RegionalConfiguration", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Region distribution configuration for the load test.", + "decorators": [], + "properties": [ + { + "$id": "352", + "kind": "property", + "name": "engineInstances", + "serializedName": "engineInstances", + "description": " The number of engine instances to execute load test in specified region. Supported values are in range of 1-400.", + "type": { + "$id": "353", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.RegionalConfiguration.engineInstances" + }, + { + "$id": "354", + "kind": "property", + "name": "region", + "serializedName": "region", + "description": "Azure region name.\nThe region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as \"eastus\".\nThe region name must match one of the strings in the \"Name\" column returned from running the \"az account list-locations -o table\" Azure CLI command.", + "type": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.RegionalConfiguration.region" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.LoadTestConfiguration.regionalLoadTestConfig" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.loadTestConfiguration" + }, + { + "$id": "356", + "kind": "property", + "name": "baselineTestRunId", + "serializedName": "baselineTestRunId", + "description": "Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs", + "type": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.baselineTestRunId" + }, + { + "$id": "358", + "kind": "property", + "name": "inputArtifacts", + "serializedName": "inputArtifacts", + "description": "The input artifacts for the test.", + "type": { + "$id": "359", + "kind": "model", + "name": "TestInputArtifacts", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts", + "usage": "Output,JsonMergePatch,Json", + "description": "The input artifacts for the test.", + "decorators": [], + "properties": [ + { + "$id": "360", + "kind": "property", + "name": "configFileInfo", + "serializedName": "configFileInfo", + "description": "File info", + "type": { + "$id": "361", + "kind": "model", + "name": "TestFileInfo", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo", + "usage": "Output,JsonMergePatch,Json", + "description": "Test file info.", + "decorators": [], + "properties": [ + { + "$id": "362", + "kind": "property", + "name": "fileName", + "serializedName": "fileName", + "description": "Name of the file.", + "type": { + "$id": "363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo.fileName" + }, + { + "$id": "364", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "File URL.", + "type": { + "$id": "365", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo.url" + }, + { + "$id": "366", + "kind": "property", + "name": "fileType", + "serializedName": "fileType", + "description": "File type", + "type": { + "$ref": "70" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo.fileType" + }, + { + "$id": "367", + "kind": "property", + "name": "expireDateTime", + "serializedName": "expireDateTime", + "description": "Expiry time of the file (RFC 3339 literal format)", + "type": { + "$id": "368", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo.expireDateTime" + }, + { + "$id": "370", + "kind": "property", + "name": "validationStatus", + "serializedName": "validationStatus", + "description": "Validation status of the file", + "type": { + "$ref": "84" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo.validationStatus" + }, + { + "$id": "371", + "kind": "property", + "name": "validationFailureDetails", + "serializedName": "validationFailureDetails", + "description": "Validation failure error details", + "type": { + "$id": "372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestFileInfo.validationFailureDetails" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts.configFileInfo" + }, + { + "$id": "373", + "kind": "property", + "name": "testScriptFileInfo", + "serializedName": "testScriptFileInfo", + "description": "File info", + "type": { + "$ref": "361" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts.testScriptFileInfo" + }, + { + "$id": "374", + "kind": "property", + "name": "userPropFileInfo", + "serializedName": "userPropFileInfo", + "description": "File info", + "type": { + "$ref": "361" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts.userPropFileInfo" + }, + { + "$id": "375", + "kind": "property", + "name": "inputArtifactsZipFileInfo", + "serializedName": "inputArtifactsZipFileInfo", + "description": "File info", + "type": { + "$ref": "361" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts.inputArtifactsZipFileInfo" + }, + { + "$id": "376", + "kind": "property", + "name": "urlTestConfigFileInfo", + "serializedName": "urlTestConfigFileInfo", + "description": "The config json file for url based test", + "type": { + "$ref": "361" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts.urlTestConfigFileInfo" + }, + { + "$id": "377", + "kind": "property", + "name": "additionalFileInfo", + "serializedName": "additionalFileInfo", + "description": "Additional supported files for the test run", + "type": { + "$id": "378", + "kind": "array", + "name": "ArrayTestFileInfo", + "valueType": { + "$ref": "361" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestInputArtifacts.additionalFileInfo" + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.inputArtifacts" + }, + { + "$id": "379", + "kind": "property", + "name": "testId", + "serializedName": "testId", + "description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "type": { + "$id": "380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.testId" + }, + { + "$id": "381", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The test description.", + "type": { + "$id": "382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.description" + }, + { + "$id": "383", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "description": "Display name of a test.", + "type": { + "$id": "384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.displayName" + }, + { + "$id": "385", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "description": "Subnet ID on which the load test instances should run.", + "type": { + "$id": "386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.subnetId" + }, + { + "$id": "387", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Kind of test.", + "type": { + "$ref": "96" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.kind" + }, + { + "$id": "388", + "kind": "property", + "name": "publicIPDisabled", + "serializedName": "publicIPDisabled", + "description": "Inject load test engines without deploying public IP for outbound access", + "type": { + "$id": "389", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.publicIPDisabled" + }, + { + "$id": "390", + "kind": "property", + "name": "keyvaultReferenceIdentityType", + "serializedName": "keyvaultReferenceIdentityType", + "description": "Type of the managed identity referencing the Key vault.", + "type": { + "$id": "391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.keyvaultReferenceIdentityType" + }, + { + "$id": "392", + "kind": "property", + "name": "keyvaultReferenceIdentityId", + "serializedName": "keyvaultReferenceIdentityId", + "description": "Resource Id of the managed identity referencing the Key vault.", + "type": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.keyvaultReferenceIdentityId" + }, + { + "$id": "394", + "kind": "property", + "name": "metricsReferenceIdentityType", + "serializedName": "metricsReferenceIdentityType", + "description": "Type of the managed identity referencing the metrics.", + "type": { + "$ref": "104" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.metricsReferenceIdentityType" + }, + { + "$id": "395", + "kind": "property", + "name": "metricsReferenceIdentityId", + "serializedName": "metricsReferenceIdentityId", + "description": "Resource Id of the managed identity referencing the metrics.", + "type": { + "$id": "396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.metricsReferenceIdentityId" + }, + { + "$id": "397", + "kind": "property", + "name": "engineBuiltInIdentityType", + "serializedName": "engineBuiltInIdentityType", + "description": "Type of the managed identity built in load test engines", + "type": { + "$ref": "104" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.engineBuiltInIdentityType" + }, + { + "$id": "398", + "kind": "property", + "name": "engineBuiltInIdentityIds", + "serializedName": "engineBuiltInIdentityIds", + "description": "Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned.", + "type": { + "$id": "399", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.engineBuiltInIdentityIds" + }, + { + "$id": "401", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "402", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.createdDateTime" + }, + { + "$id": "404", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.createdBy" + }, + { + "$id": "406", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "407", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.lastModifiedDateTime" + }, + { + "$id": "409", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Test.lastModifiedBy" + } + ] + }, + { + "$ref": "264" + }, + { + "$ref": "268" + }, + { + "$ref": "284" + }, + { + "$ref": "302" + }, + { + "$ref": "312" + }, + { + "$ref": "317" + }, + { + "$ref": "328" + }, + { + "$ref": "336" + }, + { + "$ref": "351" + }, + { + "$ref": "359" + }, + { + "$ref": "361" + }, + { + "$id": "411", + "kind": "model", + "name": "TestAppComponents", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Test app components", + "decorators": [], + "properties": [ + { + "$id": "412", + "kind": "property", + "name": "components", + "serializedName": "components", + "description": "Azure resource collection { resource id (fully qualified resource Id e.g\nsubscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n: resource object } ", + "type": { + "$id": "413", + "kind": "dict", + "keyType": { + "$id": "414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "415", + "kind": "model", + "name": "AppComponent", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "An Azure resource object (Refer azure generic resource model :https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource)", + "decorators": [], + "properties": [ + { + "$id": "416", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "description": "fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}", + "type": { + "$id": "417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.resourceId" + }, + { + "$id": "418", + "kind": "property", + "name": "resourceName", + "serializedName": "resourceName", + "description": "Azure resource name, required while creating the app component.", + "type": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.resourceName" + }, + { + "$id": "420", + "kind": "property", + "name": "resourceType", + "serializedName": "resourceType", + "description": "Azure resource type, required while creating the app component.", + "type": { + "$id": "421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.resourceType" + }, + { + "$id": "422", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "description": "Azure resource display name", + "type": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.displayName" + }, + { + "$id": "424", + "kind": "property", + "name": "resourceGroup", + "serializedName": "resourceGroup", + "description": "Resource group name of the Azure resource", + "type": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.resourceGroup" + }, + { + "$id": "426", + "kind": "property", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "description": "Subscription Id of the Azure resource", + "type": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.subscriptionId" + }, + { + "$id": "428", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Kind of Azure resource type", + "type": { + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.AppComponent.kind" + } + ] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents.components" + }, + { + "$id": "430", + "kind": "property", + "name": "testId", + "serializedName": "testId", + "description": "Test identifier", + "type": { + "$id": "431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents.testId" + }, + { + "$id": "432", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "433", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents.createdDateTime" + }, + { + "$id": "435", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents.createdBy" + }, + { + "$id": "437", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "438", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents.lastModifiedDateTime" + }, + { + "$id": "440", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestAppComponents.lastModifiedBy" + } + ] + }, + { + "$ref": "415" + }, + { + "$id": "442", + "kind": "model", + "name": "TestServerMetricConfig", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Test server metrics configuration", + "decorators": [], + "properties": [ + { + "$id": "443", + "kind": "property", + "name": "testId", + "serializedName": "testId", + "description": "Test identifier", + "type": { + "$id": "444", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig.testId" + }, + { + "$id": "445", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "description": "Azure resource metrics collection {metric id : metrics object} (Refer :\nhttps://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\nfor metric id).", + "type": { + "$id": "446", + "kind": "dict", + "keyType": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "448", + "kind": "model", + "name": "ResourceMetric", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Associated metric definition for particular metrics of the azure resource (\nRefer :\nhttps://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition).", + "decorators": [], + "properties": [ + { + "$id": "449", + "kind": "property", + "name": "id", + "serializedName": "id", + "description": "Unique name for metric.", + "type": { + "$id": "450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.id" + }, + { + "$id": "451", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "description": "Azure resource id.", + "type": { + "$id": "452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.resourceId" + }, + { + "$id": "453", + "kind": "property", + "name": "metricNamespace", + "serializedName": "metricNamespace", + "description": "Metric name space.", + "type": { + "$id": "454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.metricNamespace" + }, + { + "$id": "455", + "kind": "property", + "name": "displayDescription", + "serializedName": "displayDescription", + "description": "Metric description.", + "type": { + "$id": "456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.displayDescription" + }, + { + "$id": "457", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The invariant value of metric name", + "type": { + "$id": "458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.name" + }, + { + "$id": "459", + "kind": "property", + "name": "aggregation", + "serializedName": "aggregation", + "description": "Metric aggregation.", + "type": { + "$id": "460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.aggregation" + }, + { + "$id": "461", + "kind": "property", + "name": "unit", + "serializedName": "unit", + "description": "Metric unit.", + "type": { + "$id": "462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.unit" + }, + { + "$id": "463", + "kind": "property", + "name": "resourceType", + "serializedName": "resourceType", + "description": "Azure resource type.", + "type": { + "$id": "464", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ResourceMetric.resourceType" + } + ] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig.metrics" + }, + { + "$id": "465", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "466", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig.createdDateTime" + }, + { + "$id": "468", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig.createdBy" + }, + { + "$id": "470", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "471", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig.lastModifiedDateTime" + }, + { + "$id": "473", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestServerMetricConfig.lastModifiedBy" + } + ] + }, + { + "$ref": "448" + }, + { + "$id": "475", + "kind": "model", + "name": "TestRun", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Load test run model", + "decorators": [], + "properties": [ + { + "$id": "476", + "kind": "property", + "name": "testRunId", + "serializedName": "testRunId", + "description": "Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "type": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.testRunId" + }, + { + "$id": "478", + "kind": "property", + "name": "passFailCriteria", + "serializedName": "passFailCriteria", + "description": "Pass fail criteria for a test.", + "type": { + "$ref": "264" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.passFailCriteria" + }, + { + "$id": "479", + "kind": "property", + "name": "autoStopCriteria", + "serializedName": "autoStopCriteria", + "description": "Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.", + "type": { + "$ref": "302" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.autoStopCriteria" + }, + { + "$id": "480", + "kind": "property", + "name": "secrets", + "serializedName": "secrets", + "description": "Secrets can be stored in an Azure Key Vault or any other secret store. If the\nsecret is stored in an Azure Key Vault, the value should be the secret\nidentifier and the type should be AKV_SECRET_URI. If the secret is stored\nelsewhere, the secret value should be provided directly and the type should be\nSECRET_VALUE.", + "type": { + "$id": "481", + "kind": "dict", + "keyType": { + "$id": "482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "312" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.secrets" + }, + { + "$id": "483", + "kind": "property", + "name": "certificate", + "serializedName": "certificate", + "description": "Certificates metadata", + "type": { + "$ref": "317" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.certificate" + }, + { + "$id": "484", + "kind": "property", + "name": "environmentVariables", + "serializedName": "environmentVariables", + "description": "Environment variables which are defined as a set of pairs.", + "type": { + "$id": "485", + "kind": "dict", + "keyType": { + "$id": "486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.environmentVariables" + }, + { + "$id": "488", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "description": "Error details if there is any failure in load test run", + "type": { + "$id": "489", + "kind": "array", + "name": "ArrayErrorDetails", + "valueType": { + "$id": "490", + "kind": "model", + "name": "ErrorDetails", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ErrorDetails", + "usage": "Output,JsonMergePatch,Json", + "description": "Error details if there is any failure in load test run", + "decorators": [], + "properties": [ + { + "$id": "491", + "kind": "property", + "name": "message", + "serializedName": "message", + "description": "Error details in case test run was not successfully run.", + "type": { + "$id": "492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ErrorDetails.message" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.errorDetails" + }, + { + "$id": "493", + "kind": "property", + "name": "testRunStatistics", + "serializedName": "testRunStatistics", + "description": "Test run statistics. Key is the sampler name and value is the set of statistics for performance metrics like response time, throughput, etc. from the load test run.\nThe sampler name is the same as the name mentioned in the test script.\nSampler name \"Total\" represents the aggregated statistics of all the samplers.", + "type": { + "$id": "494", + "kind": "dict", + "keyType": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "496", + "kind": "model", + "name": "TestRunStatistics", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics", + "usage": "Output,JsonMergePatch,Json", + "description": "Test run statistics.", + "decorators": [], + "properties": [ + { + "$id": "497", + "kind": "property", + "name": "transaction", + "serializedName": "transaction", + "description": "Transaction name.", + "type": { + "$id": "498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.transaction" + }, + { + "$id": "499", + "kind": "property", + "name": "sampleCount", + "serializedName": "sampleCount", + "description": "Sampler count.", + "type": { + "$id": "500", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.sampleCount" + }, + { + "$id": "501", + "kind": "property", + "name": "errorCount", + "serializedName": "errorCount", + "description": "Error count.", + "type": { + "$id": "502", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.errorCount" + }, + { + "$id": "503", + "kind": "property", + "name": "errorPct", + "serializedName": "errorPct", + "description": "Error percentage.", + "type": { + "$id": "504", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.errorPct" + }, + { + "$id": "505", + "kind": "property", + "name": "meanResTime", + "serializedName": "meanResTime", + "description": "Mean response time.", + "type": { + "$id": "506", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.meanResTime" + }, + { + "$id": "507", + "kind": "property", + "name": "medianResTime", + "serializedName": "medianResTime", + "description": "Median response time.", + "type": { + "$id": "508", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.medianResTime" + }, + { + "$id": "509", + "kind": "property", + "name": "maxResTime", + "serializedName": "maxResTime", + "description": "Max response time.", + "type": { + "$id": "510", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.maxResTime" + }, + { + "$id": "511", + "kind": "property", + "name": "minResTime", + "serializedName": "minResTime", + "description": "Minimum response time.", + "type": { + "$id": "512", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.minResTime" + }, + { + "$id": "513", + "kind": "property", + "name": "pct1ResTime", + "serializedName": "pct1ResTime", + "description": "90 percentile response time.", + "type": { + "$id": "514", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct1ResTime" + }, + { + "$id": "515", + "kind": "property", + "name": "pct2ResTime", + "serializedName": "pct2ResTime", + "description": "95 percentile response time.", + "type": { + "$id": "516", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct2ResTime" + }, + { + "$id": "517", + "kind": "property", + "name": "pct3ResTime", + "serializedName": "pct3ResTime", + "description": "99 percentile response time.", + "type": { + "$id": "518", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct3ResTime" + }, + { + "$id": "519", + "kind": "property", + "name": "pct75ResTime", + "serializedName": "pct75ResTime", + "description": "75 percentile response time.", + "type": { + "$id": "520", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct75ResTime" + }, + { + "$id": "521", + "kind": "property", + "name": "pct96ResTime", + "serializedName": "pct96ResTime", + "description": "96 percentile response time.", + "type": { + "$id": "522", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct96ResTime" + }, + { + "$id": "523", + "kind": "property", + "name": "pct97ResTime", + "serializedName": "pct97ResTime", + "description": "97 percentile response time.", + "type": { + "$id": "524", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct97ResTime" + }, + { + "$id": "525", + "kind": "property", + "name": "pct98ResTime", + "serializedName": "pct98ResTime", + "description": "98 percentile response time.", + "type": { + "$id": "526", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct98ResTime" + }, + { + "$id": "527", + "kind": "property", + "name": "pct999ResTime", + "serializedName": "pct999ResTime", + "description": "99.9 percentile response time.", + "type": { + "$id": "528", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct999ResTime" + }, + { + "$id": "529", + "kind": "property", + "name": "pct9999ResTime", + "serializedName": "pct9999ResTime", + "description": "99.99 percentile response time.", + "type": { + "$id": "530", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.pct9999ResTime" + }, + { + "$id": "531", + "kind": "property", + "name": "throughput", + "serializedName": "throughput", + "description": "Throughput.", + "type": { + "$id": "532", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.throughput" + }, + { + "$id": "533", + "kind": "property", + "name": "receivedKBytesPerSec", + "serializedName": "receivedKBytesPerSec", + "description": "Received network bytes.", + "type": { + "$id": "534", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.receivedKBytesPerSec" + }, + { + "$id": "535", + "kind": "property", + "name": "sentKBytesPerSec", + "serializedName": "sentKBytesPerSec", + "description": "Send network bytes.", + "type": { + "$id": "536", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunStatistics.sentKBytesPerSec" + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.testRunStatistics" + }, + { + "$id": "537", + "kind": "property", + "name": "regionalStatistics", + "serializedName": "regionalStatistics", + "description": "Regional statistics. Key is the Azure region name and value is the test run statistics.\nThe region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as \"eastus\".\nThe region name must match one of the strings in the \"Name\" column returned from running the \"az account list-locations -o table\" Azure CLI command.", + "type": { + "$id": "538", + "kind": "dict", + "keyType": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "496" + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.regionalStatistics" + }, + { + "$id": "540", + "kind": "property", + "name": "loadTestConfiguration", + "serializedName": "loadTestConfiguration", + "description": "The load test configuration.", + "type": { + "$ref": "328" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.loadTestConfiguration" + }, + { + "$id": "541", + "kind": "property", + "name": "testArtifacts", + "serializedName": "testArtifacts", + "description": "Collection of test run artifacts", + "type": { + "$id": "542", + "kind": "model", + "name": "TestRunArtifacts", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunArtifacts", + "usage": "Output,JsonMergePatch,Json", + "description": "Collection of test run artifacts", + "decorators": [], + "properties": [ + { + "$id": "543", + "kind": "property", + "name": "inputArtifacts", + "serializedName": "inputArtifacts", + "description": "The input artifacts for the test run.", + "type": { + "$id": "544", + "kind": "model", + "name": "TestRunInputArtifacts", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts", + "usage": "Output,JsonMergePatch,Json", + "description": "The input artifacts for the test run.", + "decorators": [], + "properties": [ + { + "$id": "545", + "kind": "property", + "name": "configFileInfo", + "serializedName": "configFileInfo", + "description": "File info", + "type": { + "$id": "546", + "kind": "model", + "name": "TestRunFileInfo", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo", + "usage": "Output,JsonMergePatch,Json", + "description": "Test run file info.", + "decorators": [], + "properties": [ + { + "$id": "547", + "kind": "property", + "name": "fileName", + "serializedName": "fileName", + "description": "Name of the file.", + "type": { + "$id": "548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo.fileName" + }, + { + "$id": "549", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "File URL.", + "type": { + "$id": "550", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo.url" + }, + { + "$id": "551", + "kind": "property", + "name": "fileType", + "serializedName": "fileType", + "description": "File type", + "type": { + "$ref": "70" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo.fileType" + }, + { + "$id": "552", + "kind": "property", + "name": "expireDateTime", + "serializedName": "expireDateTime", + "description": "Expiry time of the file (RFC 3339 literal format)", + "type": { + "$id": "553", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo.expireDateTime" + }, + { + "$id": "555", + "kind": "property", + "name": "validationStatus", + "serializedName": "validationStatus", + "description": "Validation status of the file", + "type": { + "$ref": "84" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo.validationStatus" + }, + { + "$id": "556", + "kind": "property", + "name": "validationFailureDetails", + "serializedName": "validationFailureDetails", + "description": "Validation failure error details", + "type": { + "$id": "557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunFileInfo.validationFailureDetails" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts.configFileInfo" + }, + { + "$id": "558", + "kind": "property", + "name": "testScriptFileInfo", + "serializedName": "testScriptFileInfo", + "description": "File info", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts.testScriptFileInfo" + }, + { + "$id": "559", + "kind": "property", + "name": "userPropFileInfo", + "serializedName": "userPropFileInfo", + "description": "File info", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts.userPropFileInfo" + }, + { + "$id": "560", + "kind": "property", + "name": "inputArtifactsZipFileInfo", + "serializedName": "inputArtifactsZipFileInfo", + "description": "File info", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts.inputArtifactsZipFileInfo" + }, + { + "$id": "561", + "kind": "property", + "name": "urlTestConfigFileInfo", + "serializedName": "urlTestConfigFileInfo", + "description": "The config json file for url based test", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts.urlTestConfigFileInfo" + }, + { + "$id": "562", + "kind": "property", + "name": "additionalFileInfo", + "serializedName": "additionalFileInfo", + "description": "Additional supported files for the test run", + "type": { + "$id": "563", + "kind": "array", + "name": "ArrayTestRunFileInfo", + "valueType": { + "$ref": "546" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunInputArtifacts.additionalFileInfo" + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunArtifacts.inputArtifacts" + }, + { + "$id": "564", + "kind": "property", + "name": "outputArtifacts", + "serializedName": "outputArtifacts", + "description": "The output artifacts for the test run.", + "type": { + "$id": "565", + "kind": "model", + "name": "TestRunOutputArtifacts", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunOutputArtifacts", + "usage": "Output,JsonMergePatch,Json", + "description": "The output artifacts for the test run.", + "decorators": [], + "properties": [ + { + "$id": "566", + "kind": "property", + "name": "resultFileInfo", + "serializedName": "resultFileInfo", + "description": "File info", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunOutputArtifacts.resultFileInfo" + }, + { + "$id": "567", + "kind": "property", + "name": "logsFileInfo", + "serializedName": "logsFileInfo", + "description": "File info", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunOutputArtifacts.logsFileInfo" + }, + { + "$id": "568", + "kind": "property", + "name": "artifactsContainerInfo", + "serializedName": "artifactsContainerInfo", + "description": "The container for test run artifacts.", + "type": { + "$id": "569", + "kind": "model", + "name": "ArtifactsContainerInfo", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ArtifactsContainerInfo", + "usage": "Output,JsonMergePatch,Json", + "description": "Artifacts container info.", + "decorators": [], + "properties": [ + { + "$id": "570", + "kind": "property", + "name": "url", + "serializedName": "url", + "description": "This is a SAS URI to an Azure Storage Container that contains the test run artifacts.", + "type": { + "$id": "571", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ArtifactsContainerInfo.url" + }, + { + "$id": "572", + "kind": "property", + "name": "expireDateTime", + "serializedName": "expireDateTime", + "description": "Expiry time of the container (RFC 3339 literal format)", + "type": { + "$id": "573", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.ArtifactsContainerInfo.expireDateTime" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunOutputArtifacts.artifactsContainerInfo" + }, + { + "$id": "575", + "kind": "property", + "name": "reportFileInfo", + "serializedName": "reportFileInfo", + "description": "The report file for the test run.", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunOutputArtifacts.reportFileInfo" + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunArtifacts.outputArtifacts" + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.testArtifacts" + }, + { + "$id": "576", + "kind": "property", + "name": "testResult", + "serializedName": "testResult", + "description": "Test result for pass/Fail criteria used during the test run.", + "type": { + "$ref": "124" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.testResult" + }, + { + "$id": "577", + "kind": "property", + "name": "virtualUsers", + "serializedName": "virtualUsers", + "description": "Number of virtual users, for which test has been run.", + "type": { + "$id": "578", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.virtualUsers" + }, + { + "$id": "579", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "description": "Display name of a testRun.", + "type": { + "$id": "580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.displayName" + }, + { + "$id": "581", + "kind": "property", + "name": "testId", + "serializedName": "testId", + "description": "Associated test Id.", + "type": { + "$id": "582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.testId" + }, + { + "$id": "583", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The test run description.", + "type": { + "$id": "584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.description" + }, + { + "$id": "585", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The test run status.", + "type": { + "$ref": "132" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.status" + }, + { + "$id": "586", + "kind": "property", + "name": "startDateTime", + "serializedName": "startDateTime", + "description": "The test run start DateTime(RFC 3339 literal format).", + "type": { + "$id": "587", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.startDateTime" + }, + { + "$id": "589", + "kind": "property", + "name": "endDateTime", + "serializedName": "endDateTime", + "description": "The test run end DateTime(RFC 3339 literal format).", + "type": { + "$id": "590", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.endDateTime" + }, + { + "$id": "592", + "kind": "property", + "name": "executedDateTime", + "serializedName": "executedDateTime", + "description": "Test run initiated time.", + "type": { + "$id": "593", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.executedDateTime" + }, + { + "$id": "595", + "kind": "property", + "name": "portalUrl", + "serializedName": "portalUrl", + "description": "Portal url.", + "type": { + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.portalUrl" + }, + { + "$id": "597", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "description": "Test run duration in milliseconds.", + "type": { + "$id": "598", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.duration" + }, + { + "$id": "599", + "kind": "property", + "name": "virtualUserHours", + "serializedName": "virtualUserHours", + "description": "Virtual user hours consumed by the test run.", + "type": { + "$id": "600", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.virtualUserHours" + }, + { + "$id": "601", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "description": "Subnet ID on which the load test instances should run.", + "type": { + "$id": "602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.subnetId" + }, + { + "$id": "603", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Type of test.", + "type": { + "$ref": "96" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.kind" + }, + { + "$id": "604", + "kind": "property", + "name": "requestDataLevel", + "serializedName": "requestDataLevel", + "description": "Request data collection level for test run", + "type": { + "$ref": "166" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.requestDataLevel" + }, + { + "$id": "605", + "kind": "property", + "name": "debugLogsEnabled", + "serializedName": "debugLogsEnabled", + "description": "Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise", + "type": { + "$id": "606", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.debugLogsEnabled" + }, + { + "$id": "607", + "kind": "property", + "name": "publicIPDisabled", + "serializedName": "publicIPDisabled", + "description": "Inject load test engines without deploying public IP for outbound access", + "type": { + "$id": "608", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.publicIPDisabled" + }, + { + "$id": "609", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "description": "The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).", + "type": { + "$ref": "172" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.createdByType" + }, + { + "$id": "610", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "611", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.createdDateTime" + }, + { + "$id": "613", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.createdBy" + }, + { + "$id": "615", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "616", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.lastModifiedDateTime" + }, + { + "$id": "618", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRun.lastModifiedBy" + } + ] + }, + { + "$ref": "490" + }, + { + "$ref": "496" + }, + { + "$ref": "542" + }, + { + "$ref": "544" + }, + { + "$ref": "546" + }, + { + "$ref": "565" + }, + { + "$ref": "569" + }, + { + "$id": "620", + "kind": "model", + "name": "TestRunAppComponents", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Test run app component", + "decorators": [], + "properties": [ + { + "$id": "621", + "kind": "property", + "name": "components", + "serializedName": "components", + "description": "Azure resource collection { resource id (fully qualified resource Id e.g\nsubscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n: resource object } ", + "type": { + "$id": "622", + "kind": "dict", + "keyType": { + "$id": "623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "415" + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents.components" + }, + { + "$id": "624", + "kind": "property", + "name": "testRunId", + "serializedName": "testRunId", + "description": "Test run identifier", + "type": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents.testRunId" + }, + { + "$id": "626", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "627", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents.createdDateTime" + }, + { + "$id": "629", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents.createdBy" + }, + { + "$id": "631", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "632", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents.lastModifiedDateTime" + }, + { + "$id": "634", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunAppComponents.lastModifiedBy" + } + ] + }, + { + "$id": "636", + "kind": "model", + "name": "TestRunServerMetricConfig", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Test run server metrics configuration", + "decorators": [], + "properties": [ + { + "$id": "637", + "kind": "property", + "name": "testRunId", + "serializedName": "testRunId", + "description": "Test run identifier", + "type": { + "$id": "638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig.testRunId" + }, + { + "$id": "639", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "description": "Azure resource metrics collection {metric id : metrics object} (Refer :\nhttps://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\nfor metric id).", + "type": { + "$id": "640", + "kind": "dict", + "keyType": { + "$id": "641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "448" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig.metrics" + }, + { + "$id": "642", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "643", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig.createdDateTime" + }, + { + "$id": "645", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig.createdBy" + }, + { + "$id": "647", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "648", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig.lastModifiedDateTime" + }, + { + "$id": "650", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunServerMetricConfig.lastModifiedBy" + } + ] + }, + { + "$id": "652", + "kind": "model", + "name": "DimensionValueList", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValueList", + "usage": "Output,Json", + "description": "Metrics dimension values.", + "decorators": [], + "properties": [ + { + "$id": "653", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The dimension name", + "type": { + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValueList.name" + }, + { + "$id": "655", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The dimension value", + "type": { + "$id": "656", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValueList.value" + }, + { + "$id": "658", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "Link for the next set of values in case of paginated results, if applicable.", + "type": { + "$id": "659", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "660", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValueList.nextLink" + } + ] + }, + { + "$id": "661", + "kind": "model", + "name": "MetricDefinitionCollection", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinitionCollection", + "usage": "Output,Json", + "description": "Represents collection of metric definitions.", + "decorators": [], + "properties": [ + { + "$id": "662", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "the values for the metric definitions.", + "type": { + "$id": "663", + "kind": "array", + "name": "ArrayMetricDefinition", + "valueType": { + "$id": "664", + "kind": "model", + "name": "MetricDefinition", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition", + "usage": "Output,Json", + "description": "Metric definition", + "decorators": [], + "properties": [ + { + "$id": "665", + "kind": "property", + "name": "dimensions", + "serializedName": "dimensions", + "description": "List of dimensions", + "type": { + "$id": "666", + "kind": "array", + "name": "ArrayNameAndDesc", + "valueType": { + "$id": "667", + "kind": "model", + "name": "NameAndDesc", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.NameAndDesc", + "usage": "Output,Json", + "description": "The name and description", + "decorators": [], + "properties": [ + { + "$id": "668", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The description", + "type": { + "$id": "669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.NameAndDesc.description" + }, + { + "$id": "670", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name", + "type": { + "$id": "671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.NameAndDesc.name" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.dimensions" + }, + { + "$id": "672", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The metric description", + "type": { + "$id": "673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.description" + }, + { + "$id": "674", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The metric name", + "type": { + "$id": "675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.name" + }, + { + "$id": "676", + "kind": "property", + "name": "namespace", + "serializedName": "namespace", + "description": "The namespace the metric belongs to.", + "type": { + "$id": "677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.namespace" + }, + { + "$id": "678", + "kind": "property", + "name": "primaryAggregationType", + "serializedName": "primaryAggregationType", + "description": "The primary aggregation type value defining how to use the values for display.", + "type": { + "$ref": "190" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.primaryAggregationType" + }, + { + "$id": "679", + "kind": "property", + "name": "supportedAggregationTypes", + "serializedName": "supportedAggregationTypes", + "description": "The collection of what all aggregation types are supported.", + "type": { + "$id": "680", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.supportedAggregationTypes" + }, + { + "$id": "682", + "kind": "property", + "name": "unit", + "serializedName": "unit", + "description": "The unit of the metric.", + "type": { + "$ref": "218" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.unit" + }, + { + "$id": "683", + "kind": "property", + "name": "metricAvailabilities", + "serializedName": "metricAvailabilities", + "description": "Metric availability specifies the time grain (aggregation interval or\nfrequency).", + "type": { + "$id": "684", + "kind": "array", + "name": "ArrayMetricAvailability", + "valueType": { + "$id": "685", + "kind": "model", + "name": "MetricAvailability", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricAvailability", + "usage": "Output,Json", + "description": "Metric availability specifies the time grain (aggregation interval or frequency)", + "decorators": [], + "properties": [ + { + "$id": "686", + "kind": "property", + "name": "timeGrain", + "serializedName": "timeGrain", + "description": "The time grain specifies the aggregation interval for the metric. Expressed as\na duration 'PT1M', 'PT1H', etc.", + "type": { + "$ref": "178" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricAvailability.timeGrain" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinition.metricAvailabilities" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricDefinitionCollection.value" + } + ] + }, + { + "$ref": "664" + }, + { + "$ref": "667" + }, + { + "$ref": "685" + }, + { + "$id": "687", + "kind": "model", + "name": "MetricNamespaceCollection", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricNamespaceCollection", + "usage": "Output,Json", + "description": "Represents collection of metric namespaces.", + "decorators": [], + "properties": [ + { + "$id": "688", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The values for the metric namespaces.", + "type": { + "$id": "689", + "kind": "array", + "name": "ArrayMetricNamespace", + "valueType": { + "$id": "690", + "kind": "model", + "name": "MetricNamespace", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricNamespace", + "usage": "Output,Json", + "description": "Metric namespace class specifies the metadata for a metric namespace.", + "decorators": [], + "properties": [ + { + "$id": "691", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The namespace description.", + "type": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricNamespace.description" + }, + { + "$id": "693", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The metric namespace name.", + "type": { + "$id": "694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricNamespace.name" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricNamespaceCollection.value" + } + ] + }, + { + "$ref": "690" + }, + { + "$id": "695", + "kind": "model", + "name": "MetricRequestPayload", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricRequestPayload", + "usage": "Input,Json", + "description": "Filters to fetch the set of metric.", + "decorators": [], + "properties": [ + { + "$id": "696", + "kind": "property", + "name": "filters", + "serializedName": "filters", + "description": "Get metrics for specific dimension values. Example: Metric contains dimension\nlike SamplerName, Error. To retrieve all the time series data where SamplerName\nis equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be\n{\"SamplerName\", [\"HTTPRequest1\", \"HTTPRequest2\"}", + "type": { + "$id": "697", + "kind": "array", + "name": "ArrayDimensionFilter", + "valueType": { + "$id": "698", + "kind": "model", + "name": "DimensionFilter", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionFilter", + "usage": "Input,Json", + "description": "Dimension name and values to filter", + "decorators": [], + "properties": [ + { + "$id": "699", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The dimension name", + "type": { + "$id": "700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionFilter.name" + }, + { + "$id": "701", + "kind": "property", + "name": "values", + "serializedName": "values", + "description": "The dimension values. Maximum values can be 20.", + "type": { + "$id": "702", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionFilter.values" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricRequestPayload.filters" + } + ] + }, + { + "$ref": "698" + }, + { + "$id": "704", + "kind": "model", + "name": "Metrics", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Metrics", + "usage": "Output,Json", + "description": "The response to a metrics query.", + "decorators": [], + "properties": [ + { + "$id": "705", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The TimeSeriesElement items on this page", + "type": { + "$id": "706", + "kind": "array", + "name": "ArrayTimeSeriesElement", + "valueType": { + "$id": "707", + "kind": "model", + "name": "TimeSeriesElement", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TimeSeriesElement", + "usage": "Output,Json", + "description": "The time series returned when a data query is performed.", + "decorators": [], + "properties": [ + { + "$id": "708", + "kind": "property", + "name": "data", + "serializedName": "data", + "description": "An array of data points representing the metric values.", + "type": { + "$id": "709", + "kind": "array", + "name": "ArrayMetricValue", + "valueType": { + "$id": "710", + "kind": "model", + "name": "MetricValue", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricValue", + "usage": "Output,Json", + "description": "Represents a metric value.", + "decorators": [], + "properties": [ + { + "$id": "711", + "kind": "property", + "name": "timestamp", + "serializedName": "timestamp", + "description": "The timestamp for the metric value in RFC 3339 format.", + "type": { + "$id": "712", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricValue.timestamp" + }, + { + "$id": "714", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The metric value.", + "type": { + "$id": "715", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.MetricValue.value" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TimeSeriesElement.data" + }, + { + "$id": "716", + "kind": "property", + "name": "dimensionValues", + "serializedName": "dimensionValues", + "description": "The dimension values ", + "type": { + "$id": "717", + "kind": "array", + "name": "ArrayDimensionValue", + "valueType": { + "$id": "718", + "kind": "model", + "name": "DimensionValue", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValue", + "usage": "Output,Json", + "description": "Represents a metric dimension value.", + "decorators": [], + "properties": [ + { + "$id": "719", + "kind": "property", + "name": "name", + "serializedName": "name", + "description": "The name of the dimension.", + "type": { + "$id": "720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValue.name" + }, + { + "$id": "721", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The value of the dimension.", + "type": { + "$id": "722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.DimensionValue.value" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TimeSeriesElement.dimensionValues" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Metrics.value" + }, + { + "$id": "723", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "724", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "725", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.Metrics.nextLink" + } + ] + }, + { + "$ref": "707" + }, + { + "$ref": "710" + }, + { + "$ref": "718" + }, + { + "$id": "726", + "kind": "model", + "name": "TestProfile", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Test Profile Model.", + "decorators": [], + "properties": [ + { + "$id": "727", + "kind": "property", + "name": "testProfileId", + "serializedName": "testProfileId", + "description": "Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "type": { + "$id": "728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.testProfileId" + }, + { + "$id": "729", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "description": "Display name of the test profile.", + "type": { + "$id": "730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.displayName" + }, + { + "$id": "731", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "Description for the test profile.", + "type": { + "$id": "732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.description" + }, + { + "$id": "733", + "kind": "property", + "name": "testId", + "serializedName": "testId", + "description": "Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated.", + "type": { + "$id": "734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.testId" + }, + { + "$id": "735", + "kind": "property", + "name": "targetResourceId", + "serializedName": "targetResourceId", + "description": "Target resource ID on which the test profile is created. This property is required for creating a Test Profile and it's not allowed to be updated.", + "type": { + "$id": "736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.targetResourceId" + }, + { + "$id": "737", + "kind": "property", + "name": "targetResourceConfigurations", + "serializedName": "targetResourceConfigurations", + "description": "Configurations of the target resource on which testing would be done.", + "type": { + "$id": "738", + "kind": "model", + "name": "TargetResourceConfigurations", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TargetResourceConfigurations", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Configurations of a target resource. This varies with the kind of resource.", + "decorators": [], + "discriminatorProperty": { + "$id": "739", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Kind of the resource for which the configurations apply.", + "type": { + "$ref": "236" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TargetResourceConfigurations.kind" + }, + "properties": [ + { + "$ref": "739" + } + ], + "discriminatedSubtypes": { + "$id": "740", + "FunctionsFlexConsumption": { + "$id": "741", + "kind": "model", + "name": "FunctionFlexConsumptionTargetResourceConfigurations", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Configurations for a Function App using Flex Consumption Plan.", + "discriminatorValue": "FunctionsFlexConsumption", + "decorators": [], + "baseModel": { + "$ref": "738" + }, + "properties": [ + { + "$id": "742", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "The kind value to use when providing configuration.\nThis should typically be not changed from its value.", + "type": { + "$id": "743", + "kind": "constant", + "valueType": { + "$id": "744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "FunctionsFlexConsumption", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations.kind" + }, + { + "$id": "745", + "kind": "property", + "name": "configurations", + "serializedName": "configurations", + "description": "A map of configurations for a Function app using Flex Consumption Plan.", + "type": { + "$id": "746", + "kind": "dict", + "keyType": { + "$id": "747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "748", + "kind": "model", + "name": "FunctionFlexConsumptionResourceConfiguration", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Resource configuration instance for a Flex Consumption based Azure Function App.", + "decorators": [], + "properties": [ + { + "$id": "749", + "kind": "property", + "name": "instanceMemoryMB", + "serializedName": "instanceMemoryMB", + "description": "Memory size of the instance. Supported values are 2048, 4096.", + "type": { + "$id": "750", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration.instanceMemoryMB" + }, + { + "$id": "751", + "kind": "property", + "name": "httpConcurrency", + "serializedName": "httpConcurrency", + "description": "HTTP Concurrency for the function app.", + "type": { + "$id": "752", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration.httpConcurrency" + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations.configurations" + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.targetResourceConfigurations" + }, + { + "$id": "753", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "754", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.createdDateTime" + }, + { + "$id": "756", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.createdBy" + }, + { + "$id": "758", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "759", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.lastModifiedDateTime" + }, + { + "$id": "761", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfile.lastModifiedBy" + } + ] + }, + { + "$ref": "738" + }, + { + "$ref": "741" + }, + { + "$ref": "748" + }, + { + "$id": "763", + "kind": "model", + "name": "TestProfileRun", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun", + "usage": "Input,Output,JsonMergePatch,Json", + "description": "Test Profile Run model.", + "decorators": [], + "properties": [ + { + "$id": "764", + "kind": "property", + "name": "testProfileRunId", + "serializedName": "testProfileRunId", + "description": "Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "type": { + "$id": "765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.testProfileRunId" + }, + { + "$id": "766", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "description": "Display name for the test profile run.", + "type": { + "$id": "767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.displayName" + }, + { + "$id": "768", + "kind": "property", + "name": "description", + "serializedName": "description", + "description": "The test profile run description", + "type": { + "$id": "769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.description" + }, + { + "$id": "770", + "kind": "property", + "name": "testProfileId", + "serializedName": "testProfileId", + "description": "Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated.", + "type": { + "$id": "771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.testProfileId" + }, + { + "$id": "772", + "kind": "property", + "name": "targetResourceId", + "serializedName": "targetResourceId", + "description": "Target resource ID on which the test profile run is created", + "type": { + "$id": "773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.targetResourceId" + }, + { + "$id": "774", + "kind": "property", + "name": "targetResourceConfigurations", + "serializedName": "targetResourceConfigurations", + "description": "Configurations of the target resource on which the test profile ran.", + "type": { + "$ref": "738" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.targetResourceConfigurations" + }, + { + "$id": "775", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "The test profile run status.", + "type": { + "$ref": "240" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.status" + }, + { + "$id": "776", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "description": "Error details if there is any failure in test profile run. These errors are specific to the Test Profile Run.", + "type": { + "$id": "777", + "kind": "array", + "name": "ArrayErrorDetails", + "valueType": { + "$ref": "490" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.errorDetails" + }, + { + "$id": "778", + "kind": "property", + "name": "startDateTime", + "serializedName": "startDateTime", + "description": "The test profile run start DateTime(RFC 3339 literal format).", + "type": { + "$id": "779", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.startDateTime" + }, + { + "$id": "781", + "kind": "property", + "name": "endDateTime", + "serializedName": "endDateTime", + "description": "The test profile run end DateTime(RFC 3339 literal format).", + "type": { + "$id": "782", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.endDateTime" + }, + { + "$id": "784", + "kind": "property", + "name": "durationInSeconds", + "serializedName": "durationInSeconds", + "description": "Test profile run duration in seconds.", + "type": { + "$id": "785", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.durationInSeconds" + }, + { + "$id": "786", + "kind": "property", + "name": "testRunDetails", + "serializedName": "testRunDetails", + "description": "Details of the test runs ran as part of the test profile run.\nKey is the testRunId of the corresponding testRun.", + "type": { + "$id": "787", + "kind": "dict", + "keyType": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "789", + "kind": "model", + "name": "TestRunDetail", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunDetail", + "usage": "Output,JsonMergePatch,Json", + "description": "Details of a particular test run for a test profile run.", + "decorators": [], + "properties": [ + { + "$id": "790", + "kind": "property", + "name": "status", + "serializedName": "status", + "description": "Status of the test run.", + "type": { + "$ref": "132" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunDetail.status" + }, + { + "$id": "791", + "kind": "property", + "name": "configurationId", + "serializedName": "configurationId", + "description": "ID of the configuration on which the test ran.", + "type": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunDetail.configurationId" + }, + { + "$id": "793", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "description": "Key value pair of extra properties associated with the test run.", + "type": { + "$id": "794", + "kind": "dict", + "keyType": { + "$id": "795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestRunDetail.properties" + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.testRunDetails" + }, + { + "$id": "797", + "kind": "property", + "name": "recommendations", + "serializedName": "recommendations", + "description": "Recommendations provided based on a successful test profile run.", + "type": { + "$id": "798", + "kind": "array", + "name": "ArrayTestProfileRunRecommendation", + "valueType": { + "$id": "799", + "kind": "model", + "name": "TestProfileRunRecommendation", + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRunRecommendation", + "usage": "Output,JsonMergePatch,Json", + "description": "A recommendation object that provides a list of configuration that optimizes its category.", + "decorators": [], + "properties": [ + { + "$id": "800", + "kind": "property", + "name": "category", + "serializedName": "category", + "description": "Category of the recommendation.", + "type": { + "$ref": "256" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRunRecommendation.category" + }, + { + "$id": "801", + "kind": "property", + "name": "configurations", + "serializedName": "configurations", + "description": "List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations.", + "type": { + "$id": "802", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRunRecommendation.configurations" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.recommendations" + }, + { + "$id": "804", + "kind": "property", + "name": "createdDateTime", + "serializedName": "createdDateTime", + "description": "The creation datetime(RFC 3339 literal format).", + "type": { + "$id": "805", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.createdDateTime" + }, + { + "$id": "807", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "description": "The user that created.", + "type": { + "$id": "808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.createdBy" + }, + { + "$id": "809", + "kind": "property", + "name": "lastModifiedDateTime", + "serializedName": "lastModifiedDateTime", + "description": "The last Modified datetime(RFC 3339 literal format).", + "type": { + "$id": "810", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "811", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.lastModifiedDateTime" + }, + { + "$id": "812", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "description": "The user that last modified.", + "type": { + "$id": "813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.LoadTestService.TestProfileRun.lastModifiedBy" + } + ] + }, + { + "$ref": "789" + }, + { + "$ref": "799" + }, + { + "$id": "814", + "kind": "model", + "name": "PagedTestFileInfo", + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", + "usage": "Output,Json", + "description": "Paged collection of TestFileInfo items", + "decorators": [], + "properties": [ + { + "$id": "815", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The TestFileInfo items on this page", + "type": { + "$id": "816", + "kind": "array", + "name": "ArrayTestFileInfo", + "valueType": { + "$ref": "361" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" + }, + { + "$id": "817", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "818", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "819", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" + } + ] + }, + { + "$id": "820", + "kind": "model", + "name": "PagedTest", + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", + "usage": "Output,Json", + "description": "Paged collection of Test items", + "decorators": [], + "properties": [ + { + "$id": "821", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The Test items on this page", + "type": { + "$id": "822", + "kind": "array", + "name": "ArrayTest", + "valueType": { + "$ref": "262" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" + }, + { + "$id": "823", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "824", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "825", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" + } + ] + }, + { + "$id": "826", + "kind": "model", + "name": "PagedTestRun", + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", + "usage": "Output,Json", + "description": "Paged collection of TestRun items", + "decorators": [], + "properties": [ + { + "$id": "827", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The TestRun items on this page", + "type": { + "$id": "828", + "kind": "array", + "name": "ArrayTestRun", + "valueType": { + "$ref": "475" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" + }, + { + "$id": "829", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "830", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "831", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" + } + ] + }, + { + "$id": "832", + "kind": "model", + "name": "PagedTestProfile", + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", + "usage": "Output,Json", + "description": "Paged collection of TestProfile items", + "decorators": [], + "properties": [ + { + "$id": "833", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The TestProfile items on this page", + "type": { + "$id": "834", + "kind": "array", + "name": "ArrayTestProfile", + "valueType": { + "$ref": "726" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" + }, + { + "$id": "835", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "836", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "837", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" + } + ] + }, + { + "$id": "838", + "kind": "model", + "name": "PagedTestProfileRun", + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", + "usage": "Output,Json", + "description": "Paged collection of TestProfileRun items", + "decorators": [], + "properties": [ + { + "$id": "839", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The TestProfileRun items on this page", + "type": { + "$id": "840", + "kind": "array", + "name": "ArrayTestProfileRun", + "valueType": { + "$ref": "763" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" + }, + { + "$id": "841", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "842", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "843", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" + } + ] + } + ], + "Clients": [ + { + "$id": "844", + "Name": "LoadTestAdministrationClient", + "Operations": [ + { + "$id": "845", + "Name": "createOrUpdateTest", + "ResourceName": "Test", + "Summary": "Create a new test or update an existing test by providing the test Id.", + "Description": "Create a new test or update an existing test by providing the test Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "846", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "848", + "Type": { + "$id": "849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "850", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "851", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "852", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "This request has a JSON Merge Patch body.", + "Type": { + "$id": "853", + "kind": "constant", + "valueType": { + "$id": "854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "855", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "856", + "kind": "constant", + "valueType": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "858", + "Name": "body", + "NameInRequest": "body", + "Description": "The resource instance.", + "Type": { + "$ref": "262" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "859", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "262" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "860", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "262" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.createOrUpdateTest", + "Decorators": [], + "Examples": [ + { + "$id": "861", + "kind": "http", + "name": "Create or update a load test", + "description": "Create or update a load test", + "filePath": "2024-12-01-preview/CreateOrUpdateTest.json", + "parameters": [ + { + "$id": "862", + "parameter": { + "$ref": "846" + }, + "value": { + "$id": "863", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "864", + "parameter": { + "$ref": "850" + }, + "value": { + "$id": "865", + "kind": "string", + "type": { + "$ref": "851" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "866", + "parameter": { + "$ref": "858" + }, + "value": { + "$id": "867", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "868", + "description": { + "$id": "869", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "sample description" + }, + "displayName": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "Performance_LoadTest" + }, + "loadTestConfiguration": { + "$id": "871", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "872", + "engineInstances": { + "$id": "873", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "874", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "passFailCriteria": { + "$id": "875", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "876", + "passFailMetrics": { + "$id": "877", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "878", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "879", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "880", + "clientMetric": { + "$id": "881", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "883", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "884", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "885", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "886", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "887", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "888", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "889", + "resourceId": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "891", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "895", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "897", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "898", + "autoStopDisabled": { + "$id": "899", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "900", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "901", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "secrets": { + "$id": "902", + "kind": "dict", + "type": { + "$ref": "310" + }, + "value": { + "$id": "903", + "secret1": { + "$id": "904", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "905", + "value": { + "$id": "906", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "907", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "908", + "kind": "dict", + "type": { + "$ref": "324" + }, + "value": { + "$id": "909", + "envvar1": { + "$id": "910", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "sampletext" + } + } + }, + "subnetId": { + "$id": "911", + "kind": "string", + "type": { + "$ref": "386" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "keyvaultReferenceIdentityType": { + "$id": "912", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "UserAssigned" + }, + "keyvaultReferenceIdentityId": { + "$id": "913", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/sampleprovider/sampleresourcetype/sampleresourcename" + }, + "metricsReferenceIdentityType": { + "$id": "914", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "UserAssigned" + }, + "metricsReferenceIdentityId": { + "$id": "915", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename" + }, + "engineBuiltInIdentityType": { + "$id": "916", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "UserAssigned" + }, + "engineBuiltInIdentityIds": { + "$id": "917", + "kind": "array", + "type": { + "$ref": "399" + }, + "value": [ + { + "$id": "918", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename" + } + ] + } + } + } + } + ], + "responses": [ + { + "$id": "919", + "response": { + "$ref": "860" + }, + "statusCode": 200, + "bodyValue": { + "$id": "920", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "921", + "testId": { + "$id": "922", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "923", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "sample description" + }, + "displayName": { + "$id": "924", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "Performance_LoadTest" + }, + "loadTestConfiguration": { + "$id": "925", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "926", + "engineInstances": { + "$id": "927", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "928", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "passFailCriteria": { + "$id": "929", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "930", + "passFailMetrics": { + "$id": "931", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "932", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "933", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "934", + "clientMetric": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "938", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "939", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "940", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "942", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "943", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "944", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "945", + "resourceId": { + "$id": "946", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "951", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "953", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "954", + "autoStopDisabled": { + "$id": "955", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "956", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "957", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "createdDateTime": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "405" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "960", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "961", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "user@contoso.com" + }, + "inputArtifacts": { + "$id": "962", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "963", + "configFileInfo": { + "$id": "964", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "965", + "url": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "968", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "969", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "970", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "971", + "url": { + "$id": "972", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "973", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "974", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "975", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "976", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "977", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "978", + "url": { + "$id": "979", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "980", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "981", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "982", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "983", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "984", + "url": { + "$id": "985", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "986", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "987", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "989", + "kind": "array", + "type": { + "$ref": "378" + }, + "value": [] + } + } + }, + "secrets": { + "$id": "990", + "kind": "dict", + "type": { + "$ref": "310" + }, + "value": { + "$id": "991", + "secret1": { + "$id": "992", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "993", + "value": { + "$id": "994", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "995", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "996", + "kind": "dict", + "type": { + "$ref": "324" + }, + "value": { + "$id": "997", + "envvar1": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "sampletext" + } + } + }, + "subnetId": { + "$id": "999", + "kind": "string", + "type": { + "$ref": "386" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "keyvaultReferenceIdentityType": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "UserAssigned" + }, + "keyvaultReferenceIdentityId": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + "engineBuiltInIdentityType": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "UserAssigned" + }, + "engineBuiltInIdentityIds": { + "$id": "1003", + "kind": "array", + "type": { + "$ref": "399" + }, + "value": [ + { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename" + } + ] + } + } + } + }, + { + "$id": "1005", + "response": { + "$ref": "859" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1006", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "1007", + "testId": { + "$id": "1008", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "1009", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "sample description" + }, + "displayName": { + "$id": "1010", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "Performance_LoadTest" + }, + "loadTestConfiguration": { + "$id": "1011", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1012", + "engineInstances": { + "$id": "1013", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "1014", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "passFailCriteria": { + "$id": "1015", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1016", + "passFailMetrics": { + "$id": "1017", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1018", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1019", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1020", + "clientMetric": { + "$id": "1021", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "1023", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "1024", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "1025", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "1026", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "1027", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "1028", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "1029", + "autoStopDisabled": { + "$id": "1030", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "1031", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "1032", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "createdDateTime": { + "$id": "1033", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1034", + "kind": "string", + "type": { + "$ref": "405" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1036", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "user@contoso.com" + }, + "inputArtifacts": { + "$id": "1037", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1038", + "configFileInfo": { + "$id": "1039", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1040", + "url": { + "$id": "1041", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1042", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "1043", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "1045", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1046", + "url": { + "$id": "1047", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1049", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1050", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "1052", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1053", + "url": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "1058", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1059", + "url": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "1064", + "kind": "array", + "type": { + "$ref": "378" + }, + "value": [] + } + } + }, + "secrets": { + "$id": "1065", + "kind": "dict", + "type": { + "$ref": "310" + }, + "value": { + "$id": "1066", + "secret1": { + "$id": "1067", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1068", + "value": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "1071", + "kind": "dict", + "type": { + "$ref": "324" + }, + "value": { + "$id": "1072", + "envvar1": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "sampletext" + } + } + }, + "subnetId": { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "386" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "keyvaultReferenceIdentityType": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "UserAssigned" + }, + "keyvaultReferenceIdentityId": { + "$id": "1076", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + "engineBuiltInIdentityType": { + "$id": "1077", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "UserAssigned" + }, + "engineBuiltInIdentityIds": { + "$id": "1078", + "kind": "array", + "type": { + "$ref": "399" + }, + "value": [ + { + "$id": "1079", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename" + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1080", + "Name": "createOrUpdateAppComponents", + "ResourceName": "AdministrationOperations", + "Summary": "Add an app component to a test.", + "Description": "Add an app component to a test by providing the resource Id, name and type.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1081", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1083", + "Type": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1085", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Content type.", + "Type": { + "$id": "1086", + "kind": "constant", + "valueType": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1088", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique name for the load test, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "1089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1090", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1091", + "kind": "constant", + "valueType": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1093", + "Name": "body", + "NameInRequest": "body", + "Description": "App Component model.", + "Type": { + "$ref": "411" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1094", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "411" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1095", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "411" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/app-components", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.createOrUpdateAppComponents", + "Decorators": [], + "Examples": [ + { + "$id": "1096", + "kind": "http", + "name": "Add or update app components to a load test", + "description": "Add or update app components to a load test", + "filePath": "2024-12-01-preview/CreateOrUpdateTestAppComponents.json", + "parameters": [ + { + "$id": "1097", + "parameter": { + "$ref": "1088" + }, + "value": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "1089" + }, + "value": "ee843bd9-a6d4-4364-a45c-427a03c39fa7" + } + }, + { + "$id": "1099", + "parameter": { + "$ref": "1081" + }, + "value": { + "$id": "1100", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "1101", + "parameter": { + "$ref": "1093" + }, + "value": { + "$id": "1102", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1103", + "components": { + "$id": "1104", + "kind": "dict", + "type": { + "$ref": "413" + }, + "value": { + "$id": "1105", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "1106", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1107", + "resourceType": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "1109", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "kind": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1112", + "response": { + "$ref": "1095" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1113", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1114", + "testId": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "components": { + "$id": "1116", + "kind": "dict", + "type": { + "$ref": "413" + }, + "value": { + "$id": "1117", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "1118", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1119", + "resourceId": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "417" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "resourceType": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "resourceGroup": { + "$id": "1124", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "samplerg" + }, + "subscriptionId": { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "00000000-0000-0000-0000-000000000000" + }, + "kind": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + }, + "createdDateTime": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1129", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "441" + }, + "value": "user@contoso.com" + } + } + } + }, + { + "$id": "1131", + "response": { + "$ref": "1094" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1132", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1133", + "testId": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "components": { + "$id": "1135", + "kind": "dict", + "type": { + "$ref": "413" + }, + "value": { + "$id": "1136", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "1137", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1138", + "resourceId": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "417" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "resourceType": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "resourceGroup": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "samplerg" + }, + "subscriptionId": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "00000000-0000-0000-0000-000000000000" + }, + "kind": { + "$id": "1145", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + }, + "createdDateTime": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1149", + "kind": "string", + "type": { + "$ref": "441" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "1150", + "Name": "createOrUpdateServerMetricsConfig", + "ResourceName": "AdministrationOperations", + "Summary": "Configure server metrics for a test", + "Description": "Configure server metrics for a test", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1151", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1153", + "Type": { + "$id": "1154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1155", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Content type.", + "Type": { + "$id": "1156", + "kind": "constant", + "valueType": { + "$id": "1157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1158", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique name for the load test, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "1159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1160", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1161", + "kind": "constant", + "valueType": { + "$id": "1162", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1163", + "Name": "body", + "NameInRequest": "body", + "Description": "Server metric configuration model.", + "Type": { + "$ref": "442" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1164", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "442" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1165", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "442" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/server-metrics-config", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig", + "Decorators": [], + "Examples": [ + { + "$id": "1166", + "kind": "http", + "name": "Add or update server metrics configuration for a load test.", + "description": "Add or update server metrics configuration for a load test.", + "filePath": "2024-12-01-preview/CreateOrUpdateTestServerMetricsConfig.json", + "parameters": [ + { + "$id": "1167", + "parameter": { + "$ref": "1158" + }, + "value": { + "$id": "1168", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "edc6e529-d009-4b99-b763-ca492e3a2823" + } + }, + { + "$id": "1169", + "parameter": { + "$ref": "1151" + }, + "value": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "1152" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "1171", + "parameter": { + "$ref": "1163" + }, + "value": { + "$id": "1172", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "1173", + "metrics": { + "$id": "1174", + "kind": "dict", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1175", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "1176", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "1177", + "resourceId": { + "$id": "1178", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "1179", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "1180", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "1181", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "1183", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1184", + "response": { + "$ref": "1165" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1185", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "1186", + "testId": { + "$id": "1187", + "kind": "string", + "type": { + "$ref": "444" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "metrics": { + "$id": "1188", + "kind": "dict", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1189", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "1190", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "1191", + "id": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "450" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration" + }, + "resourceId": { + "$id": "1193", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "1195", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "1197", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + }, + "createdDateTime": { + "$id": "1199", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "469" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1201", + "kind": "string", + "type": { + "$ref": "471" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "user@contoso.com" + } + } + } + }, + { + "$id": "1203", + "response": { + "$ref": "1164" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1204", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "1205", + "testId": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "444" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "metrics": { + "$id": "1207", + "kind": "dict", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1208", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "1209", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "1210", + "id": { + "$id": "1211", + "kind": "string", + "type": { + "$ref": "450" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration" + }, + "resourceId": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "1213", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "1215", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "1216", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "1217", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + }, + "createdDateTime": { + "$id": "1218", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "469" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "471" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "1222", + "Name": "getAppComponents", + "ResourceName": "AdministrationOperations", + "Summary": "Get associated app component (collection of azure resources) for the given test.", + "Description": "Get associated app component (collection of azure resources) for the given test.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1223", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1225", + "Type": { + "$id": "1226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1227", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique name for the load test, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "1228", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1229", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1230", + "kind": "constant", + "valueType": { + "$id": "1231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1232", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "411" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/app-components", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.getAppComponents", + "Decorators": [], + "Examples": [ + { + "$id": "1233", + "kind": "http", + "name": "Get associated app component for the given test.", + "description": "Get associated app component for the given test.", + "filePath": "2024-12-01-preview/ListTestAppComponents.json", + "parameters": [ + { + "$id": "1234", + "parameter": { + "$ref": "1227" + }, + "value": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "1228" + }, + "value": "ee843bd9-a6d4-4364-a45c-427a03c39fa7" + } + }, + { + "$id": "1236", + "parameter": { + "$ref": "1223" + }, + "value": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "1224" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1238", + "response": { + "$ref": "1232" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1239", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1240", + "testId": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "components": { + "$id": "1242", + "kind": "dict", + "type": { + "$ref": "413" + }, + "value": { + "$id": "1243", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "1244", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1245", + "resourceId": { + "$id": "1246", + "kind": "string", + "type": { + "$ref": "417" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "resourceType": { + "$id": "1247", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "1248", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "1249", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "resourceGroup": { + "$id": "1250", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "samplerg" + }, + "subscriptionId": { + "$id": "1251", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "00000000-0000-0000-0000-000000000000" + }, + "kind": { + "$id": "1252", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + }, + "createdDateTime": { + "$id": "1253", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1255", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1256", + "kind": "string", + "type": { + "$ref": "441" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "1257", + "Name": "getServerMetricsConfig", + "ResourceName": "AdministrationOperations", + "Summary": "List server metrics configuration for the given test.", + "Description": "List server metrics configuration for the given test.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1258", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1260", + "Type": { + "$id": "1261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1262", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique name for the load test, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "1263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1264", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1265", + "kind": "constant", + "valueType": { + "$id": "1266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1267", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "442" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/server-metrics-config", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.getServerMetricsConfig", + "Decorators": [], + "Examples": [ + { + "$id": "1268", + "kind": "http", + "name": "List server metrics configuration for the given test.", + "description": "List server metrics configuration for the given test.", + "filePath": "2024-12-01-preview/ListTestServerMetricsConfig.json", + "parameters": [ + { + "$id": "1269", + "parameter": { + "$ref": "1262" + }, + "value": { + "$id": "1270", + "kind": "string", + "type": { + "$ref": "1263" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1271", + "parameter": { + "$ref": "1258" + }, + "value": { + "$id": "1272", + "kind": "string", + "type": { + "$ref": "1259" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1273", + "response": { + "$ref": "1267" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1274", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "1275", + "testId": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "444" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "metrics": { + "$id": "1277", + "kind": "dict", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1278", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "1279", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "1280", + "id": { + "$id": "1281", + "kind": "string", + "type": { + "$ref": "450" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration" + }, + "resourceId": { + "$id": "1282", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "1283", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "1284", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "1285", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "1286", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "1287", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + }, + "createdDateTime": { + "$id": "1288", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1289", + "kind": "string", + "type": { + "$ref": "469" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "471" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1291", + "kind": "string", + "type": { + "$ref": "474" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "1292", + "Name": "getTest", + "ResourceName": "Test", + "Summary": "Get load test details by test Id", + "Description": "Get load test details by test Id", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1293", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1295", + "Type": { + "$id": "1296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1297", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "1298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1299", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1300", + "kind": "constant", + "valueType": { + "$id": "1301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1302", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "262" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.getTest", + "Decorators": [], + "Examples": [ + { + "$id": "1303", + "kind": "http", + "name": "Get a load test.", + "description": "Get a load test.", + "filePath": "2024-12-01-preview/GetTest.json", + "parameters": [ + { + "$id": "1304", + "parameter": { + "$ref": "1297" + }, + "value": { + "$id": "1305", + "kind": "string", + "type": { + "$ref": "1298" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1306", + "parameter": { + "$ref": "1293" + }, + "value": { + "$id": "1307", + "kind": "string", + "type": { + "$ref": "1294" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1308", + "response": { + "$ref": "1302" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1309", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "1310", + "testId": { + "$id": "1311", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "1312", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "sample description" + }, + "displayName": { + "$id": "1313", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "Performance_LoadTest" + }, + "loadTestConfiguration": { + "$id": "1314", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1315", + "engineInstances": { + "$id": "1316", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "1317", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "passFailCriteria": { + "$id": "1318", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1319", + "passFailMetrics": { + "$id": "1320", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1321", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1322", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1323", + "clientMetric": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "1325", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "1327", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "1329", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 0 + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "1330", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "1331", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1332", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1333", + "resourceId": { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "1335", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "1336", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "1337", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "1338", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "1339", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "1340", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "1341", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "1342", + "autoStopDisabled": { + "$id": "1343", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "1344", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "1345", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "createdDateTime": { + "$id": "1346", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1347", + "kind": "string", + "type": { + "$ref": "405" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1348", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "user@contoso.com" + }, + "inputArtifacts": { + "$id": "1350", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1351", + "configFileInfo": { + "$id": "1352", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1353", + "url": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1355", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "1356", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "1358", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1359", + "url": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1364", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "1365", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1366", + "url": { + "$id": "1367", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "1371", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1372", + "url": { + "$id": "1373", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1374", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "1375", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "1377", + "kind": "array", + "type": { + "$ref": "378" + }, + "value": [] + } + } + }, + "secrets": { + "$id": "1378", + "kind": "dict", + "type": { + "$ref": "310" + }, + "value": { + "$id": "1379", + "secret1": { + "$id": "1380", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1381", + "value": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "1383", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "1384", + "kind": "dict", + "type": { + "$ref": "324" + }, + "value": { + "$id": "1385", + "envvar1": { + "$id": "1386", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "sampletext" + } + } + }, + "subnetId": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "386" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "keyvaultReferenceIdentityType": { + "$id": "1388", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "UserAssigned" + }, + "keyvaultReferenceIdentityId": { + "$id": "1389", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + "metricsReferenceIdentityType": { + "$id": "1390", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "UserAssigned" + }, + "metricsReferenceIdentityId": { + "$id": "1391", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename" + } + } + } + } + ] + } + ] + }, + { + "$id": "1392", + "Name": "getTestFile", + "ResourceName": "TestFileInfo", + "Summary": "Get all the files that are associated with a test.", + "Description": "Get all the files that are associated with a test.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1393", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1395", + "Type": { + "$id": "1396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1397", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "1398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1399", + "Name": "fileName", + "NameInRequest": "fileName", + "Description": "Name of the file.", + "Type": { + "$id": "1400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1401", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1402", + "kind": "constant", + "valueType": { + "$id": "1403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1404", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "361" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/files/{fileName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.getTestFile", + "Decorators": [], + "Examples": [ + { + "$id": "1405", + "kind": "http", + "name": "Get a file from a load test", + "description": "Get a file from a load test", + "filePath": "2024-12-01-preview/GetTestFile.json", + "parameters": [ + { + "$id": "1406", + "parameter": { + "$ref": "1397" + }, + "value": { + "$id": "1407", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1408", + "parameter": { + "$ref": "1399" + }, + "value": { + "$id": "1409", + "kind": "string", + "type": { + "$ref": "1400" + }, + "value": "sample.jmx" + } + }, + { + "$id": "1410", + "parameter": { + "$ref": "1393" + }, + "value": { + "$id": "1411", + "kind": "string", + "type": { + "$ref": "1394" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1412", + "response": { + "$ref": "1404" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1413", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1414", + "url": { + "$id": "1415", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://dummyurl.com/testscriptresource" + }, + "fileName": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1418", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1419", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + } + } + ] + } + ] + }, + { + "$id": "1420", + "Name": "listTestFiles", + "ResourceName": "TestFileInfo", + "Summary": "Get all test files.", + "Description": "Get all test files.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1421", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1423", + "Type": { + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1425", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "1426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1427", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1428", + "kind": "constant", + "valueType": { + "$id": "1429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1430", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "814" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/files", + "BufferResponse": true, + "Paging": { + "$id": "1431", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.listTestFiles", + "Decorators": [], + "Examples": [ + { + "$id": "1432", + "kind": "http", + "name": "Get all test files.", + "description": "Get all test files.", + "filePath": "2024-12-01-preview/ListTestFiles.json", + "parameters": [ + { + "$id": "1433", + "parameter": { + "$ref": "1425" + }, + "value": { + "$id": "1434", + "kind": "string", + "type": { + "$ref": "1426" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1435", + "parameter": { + "$ref": "1421" + }, + "value": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1437", + "response": { + "$ref": "1430" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1438", + "kind": "model", + "type": { + "$ref": "814" + }, + "value": { + "$id": "1439", + "value": { + "$id": "1440", + "kind": "array", + "type": { + "$ref": "816" + }, + "value": [ + { + "$id": "1441", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1442", + "url": { + "$id": "1443", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://dummyurl.com/testscriptresource" + }, + "fileName": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1445", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1448", + "Name": "listTests", + "ResourceName": "Test", + "Summary": "Get all load tests by the fully qualified resource Id e.g\nsubscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.", + "Description": "Get all load tests by the fully qualified resource Id e.g\nsubscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1449", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1451", + "Type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1453", + "Name": "orderby", + "NameInRequest": "orderby", + "Description": "Sort on the supported fields in (field asc/desc) format. eg:\nlastModifiedDateTime asc. Supported fields - lastModifiedDateTime", + "Type": { + "$id": "1454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1455", + "Name": "search", + "NameInRequest": "search", + "Description": "Prefix based, case sensitive search on searchable fields - displayName,\ncreatedBy. For example, to search for a test, with display name is Login Test,\nthe search parameter can be Login.", + "Type": { + "$id": "1456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1457", + "Name": "lastModifiedStartTime", + "NameInRequest": "lastModifiedStartTime", + "Description": "Start DateTime(RFC 3339 literal format) of the last updated time range to filter tests.", + "Type": { + "$id": "1458", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1460", + "Name": "lastModifiedEndTime", + "NameInRequest": "lastModifiedEndTime", + "Description": "End DateTime(RFC 3339 literal format) of the last updated time range to filter tests.", + "Type": { + "$id": "1461", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1463", + "Name": "maxpagesize", + "NameInRequest": "maxpagesize", + "Description": "Number of results in response.", + "Type": { + "$id": "1464", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1465", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1466", + "kind": "constant", + "valueType": { + "$id": "1467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1468", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "820" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests", + "BufferResponse": true, + "Paging": { + "$id": "1469", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.listTests", + "Decorators": [], + "Examples": [ + { + "$id": "1470", + "kind": "http", + "name": "Get all load tests.", + "description": "Get all load tests.", + "filePath": "2024-12-01-preview/ListTests.json", + "parameters": [ + { + "$id": "1471", + "parameter": { + "$ref": "1455" + }, + "value": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "Performance_LoadTest" + } + }, + { + "$id": "1473", + "parameter": { + "$ref": "1449" + }, + "value": { + "$id": "1474", + "kind": "string", + "type": { + "$ref": "1450" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1475", + "response": { + "$ref": "1468" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1476", + "kind": "model", + "type": { + "$ref": "820" + }, + "value": { + "$id": "1477", + "value": { + "$id": "1478", + "kind": "array", + "type": { + "$ref": "822" + }, + "value": [ + { + "$id": "1479", + "kind": "model", + "type": { + "$ref": "262" + }, + "value": { + "$id": "1480", + "testId": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "sample description" + }, + "displayName": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "Performance_LoadTest" + }, + "loadTestConfiguration": { + "$id": "1484", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1485", + "engineInstances": { + "$id": "1486", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "1487", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "passFailCriteria": { + "$id": "1488", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1489", + "passFailMetrics": { + "$id": "1490", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1491", + "pfmetric1": { + "$id": "1492", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1493", + "clientMetric": { + "$id": "1494", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "1495", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "1496", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "1497", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "1498", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "1499", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "1500", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "1501", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "1502", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1503", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1504", + "resourceId": { + "$id": "1505", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "1507", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "1508", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "1509", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "1510", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "1511", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "1512", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "1513", + "autoStopDisabled": { + "$id": "1514", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "1515", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "1516", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "createdDateTime": { + "$id": "1517", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "405" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1519", + "kind": "string", + "type": { + "$ref": "407" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "user@contoso.com" + }, + "inputArtifacts": { + "$id": "1521", + "kind": "model", + "type": { + "$ref": "359" + }, + "value": { + "$id": "1522", + "configFileInfo": { + "$id": "1523", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1524", + "url": { + "$id": "1525", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "1527", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1528", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "1529", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1530", + "url": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1533", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1535", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "1536", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1537", + "url": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1539", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "1540", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "1541", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "1542", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1543", + "url": { + "$id": "1544", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1545", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "1548", + "kind": "array", + "type": { + "$ref": "378" + }, + "value": [] + } + } + }, + "secrets": { + "$id": "1549", + "kind": "dict", + "type": { + "$ref": "310" + }, + "value": { + "$id": "1550", + "secret1": { + "$id": "1551", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1552", + "value": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "1554", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "1555", + "kind": "dict", + "type": { + "$ref": "324" + }, + "value": { + "$id": "1556", + "envvar1": { + "$id": "1557", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "sampletext" + } + } + }, + "subnetId": { + "$id": "1558", + "kind": "string", + "type": { + "$ref": "386" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "keyvaultReferenceIdentityType": { + "$id": "1559", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "UserAssigned" + }, + "keyvaultReferenceIdentityId": { + "$id": "1560", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + "metricsReferenceIdentityType": { + "$id": "1561", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "UserAssigned" + }, + "metricsReferenceIdentityId": { + "$id": "1562", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/samplerg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleresourcename" + } + } + } + ] + }, + "nextLink": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "824" + }, + "value": "https://00000000-0000-0000-aaaa-00aa00aa00aa.westus2.cnt-prod.loadtesting.azure.com/tests?orderby=executedDateTime%20desc&continuationToken=some-value&search=&testId=&executionFrom=&executionTo=&status=&maxpagesize=50&api-version=2024-05-01-preview" + } + } + } + } + ] + } + ] + }, + { + "$id": "1564", + "Name": "uploadTestFile", + "ResourceName": "AdministrationOperations", + "Summary": "Upload input file for a given test Id. File size can't be more than 50 MB.\nExisting file with same name for the given test will be overwritten. File\nshould be provided in the request body as application/octet-stream.", + "Description": "Upload input file for a given test Id. File size can't be more than 50 MB.\nExisting file with same name for the given test will be overwritten. File\nshould be provided in the request body as application/octet-stream.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1565", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1567", + "Type": { + "$id": "1568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1569", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Content type.", + "Type": { + "$id": "1570", + "kind": "constant", + "valueType": { + "$id": "1571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1572", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique name for the load test, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "1573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1574", + "Name": "fileName", + "NameInRequest": "fileName", + "Description": "Unique name for test file with file extension like : App.jmx", + "Type": { + "$id": "1575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1576", + "Name": "fileType", + "NameInRequest": "fileType", + "Description": "File type", + "Type": { + "$ref": "70" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1577", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1578", + "kind": "constant", + "valueType": { + "$id": "1579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1580", + "Name": "body", + "NameInRequest": "body", + "Description": "The file content as application/octet-stream.", + "Type": { + "$id": "1581", + "kind": "bytes", + "name": "bytes", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1582", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "361" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "RequestBodyMediaType": "Binary", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/files/{fileName}", + "RequestMediaTypes": [ + "application/octet-stream" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.uploadTestFile", + "Decorators": [], + "Examples": [ + { + "$id": "1583", + "kind": "http", + "name": "Upload input file for a given test name.", + "description": "Upload input file for a given test name.", + "filePath": "2024-12-01-preview/UploadTestFile.json", + "parameters": [ + { + "$id": "1584", + "parameter": { + "$ref": "1572" + }, + "value": { + "$id": "1585", + "kind": "string", + "type": { + "$ref": "1573" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1586", + "parameter": { + "$ref": "1574" + }, + "value": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "1575" + }, + "value": "sample.jmx" + } + }, + { + "$id": "1588", + "parameter": { + "$ref": "1576" + }, + "value": { + "$id": "1589", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + } + }, + { + "$id": "1590", + "parameter": { + "$ref": "1580" + }, + "value": { + "$id": "1591", + "kind": "string", + "type": { + "$ref": "1581" + }, + "value": "application/octet-stream content" + } + }, + { + "$id": "1592", + "parameter": { + "$ref": "1565" + }, + "value": { + "$id": "1593", + "kind": "string", + "type": { + "$ref": "1566" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1594", + "response": { + "$ref": "1582" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1595", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1596", + "url": { + "$id": "1597", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "https://dummyurl.com/testscriptresource" + }, + "fileName": { + "$id": "1598", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1599", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1600", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + } + } + ] + } + ] + }, + { + "$id": "1602", + "Name": "deleteTestFile", + "ResourceName": "TestFileInfo", + "Summary": "Delete file by the file name for a test", + "Description": "Delete file by the file name for a test", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1603", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1605", + "Type": { + "$id": "1606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1607", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1609", + "Name": "fileName", + "NameInRequest": "fileName", + "Description": "Name of the file.", + "Type": { + "$id": "1610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1611", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1612", + "kind": "constant", + "valueType": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1614", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}/files/{fileName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.deleteTestFile", + "Decorators": [], + "Examples": [ + { + "$id": "1615", + "kind": "http", + "name": "Delete a file from a load test", + "description": "Delete a file from a load test", + "filePath": "2024-12-01-preview/DeleteTestFile.json", + "parameters": [ + { + "$id": "1616", + "parameter": { + "$ref": "1607" + }, + "value": { + "$id": "1617", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1618", + "parameter": { + "$ref": "1609" + }, + "value": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "1610" + }, + "value": "app.jmx" + } + }, + { + "$id": "1620", + "parameter": { + "$ref": "1603" + }, + "value": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "1604" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1622", + "response": { + "$ref": "1614" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1623", + "Name": "deleteTest", + "ResourceName": "Test", + "Summary": "Delete a test by its test Id.", + "Description": "Delete a test by its test Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1624", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1626", + "Type": { + "$id": "1627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1628", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "1629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1630", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1631", + "kind": "constant", + "valueType": { + "$id": "1632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1633", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/tests/{testId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.AdministrationOperations.deleteTest", + "Decorators": [], + "Examples": [ + { + "$id": "1634", + "kind": "http", + "name": "Delete a load test", + "description": "Delete a load test", + "filePath": "2024-12-01-preview/DeleteTest.json", + "parameters": [ + { + "$id": "1635", + "parameter": { + "$ref": "1628" + }, + "value": { + "$id": "1636", + "kind": "string", + "type": { + "$ref": "1629" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1637", + "parameter": { + "$ref": "1624" + }, + "value": { + "$id": "1638", + "kind": "string", + "type": { + "$ref": "1625" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "1639", + "response": { + "$ref": "1633" + }, + "statusCode": 204 + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1640" + }, + "Parameters": [ + { + "$id": "1641", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "1642", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client" + } + ], + "Decorators": [] + }, + { + "$id": "1643", + "Name": "LoadTestRunClient", + "Operations": [ + { + "$id": "1644", + "Name": "createOrUpdateTestRun", + "ResourceName": "TestRun", + "Summary": "Create and start a new test run with the given test run Id.", + "Description": "Create and start a new test run with the given test run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1645", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1647", + "Type": { + "$id": "1648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1649", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "1650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1651", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "This request has a JSON Merge Patch body.", + "Type": { + "$id": "1652", + "kind": "constant", + "valueType": { + "$id": "1653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1654", + "Name": "oldTestRunId", + "NameInRequest": "oldTestRunId", + "Description": "Existing test run identifier that should be rerun, if this is provided, the\ntest will run with the JMX file, configuration and app components from the\nexisting test run. You can override the configuration values for new test run\nin the request body.", + "Type": { + "$id": "1655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1656", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1657", + "kind": "constant", + "valueType": { + "$id": "1658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1659", + "Name": "body", + "NameInRequest": "body", + "Description": "The resource instance.", + "Type": { + "$ref": "475" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1660", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "475" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1661", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "475" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.createOrUpdateTestRun", + "Decorators": [], + "Examples": [ + { + "$id": "1662", + "kind": "http", + "name": "Create/update and start a load test run", + "description": "Create/update and start a load test run", + "filePath": "2024-12-01-preview/CreateOrUpdateTestRun.json", + "parameters": [ + { + "$id": "1663", + "parameter": { + "$ref": "1649" + }, + "value": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "1650" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "1665", + "parameter": { + "$ref": "1654" + }, + "value": { + "$id": "1666", + "kind": "string", + "type": { + "$ref": "1655" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "1667", + "parameter": { + "$ref": "1645" + }, + "value": { + "$id": "1668", + "kind": "string", + "type": { + "$ref": "1646" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "1669", + "parameter": { + "$ref": "1659" + }, + "value": { + "$id": "1670", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "1671", + "displayName": { + "$id": "1672", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "Performance_LoadTest_Run1" + }, + "testId": { + "$id": "1673", + "kind": "string", + "type": { + "$ref": "582" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "sample description" + }, + "loadTestConfiguration": { + "$id": "1675", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1676", + "engineInstances": { + "$id": "1677", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "1678", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "passFailCriteria": { + "$id": "1679", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1680", + "passFailMetrics": { + "$id": "1681", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1682", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1683", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1684", + "clientMetric": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "1688", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "1690", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "1691", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1692", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1693", + "resourceId": { + "$id": "1694", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "1699", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "1701", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "1702", + "autoStopDisabled": { + "$id": "1703", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "1704", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "1705", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "secrets": { + "$id": "1706", + "kind": "dict", + "type": { + "$ref": "481" + }, + "value": { + "$id": "1707", + "secret1": { + "$id": "1708", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1709", + "value": { + "$id": "1710", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "1712", + "kind": "dict", + "type": { + "$ref": "485" + }, + "value": { + "$id": "1713", + "envvar1": { + "$id": "1714", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "sampletext" + } + } + }, + "debugLogsEnabled": { + "$id": "1715", + "kind": "boolean", + "type": { + "$ref": "606" + }, + "value": true + }, + "requestDataLevel": { + "$id": "1716", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "NONE" + } + } + } + } + ], + "responses": [ + { + "$id": "1717", + "response": { + "$ref": "1661" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1718", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "1719", + "testRunId": { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "Performance_LoadTest_Run1" + }, + "testId": { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "582" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "1723", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "sample description" + }, + "status": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "ACCEPTED" + }, + "startDateTime": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "endDateTime": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "590" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "loadTestConfiguration": { + "$id": "1727", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1728", + "engineInstances": { + "$id": "1729", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "1730", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "testResult": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "PASSED" + }, + "passFailCriteria": { + "$id": "1732", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1733", + "passFailMetrics": { + "$id": "1734", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1735", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1736", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1737", + "clientMetric": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "1739", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "1741", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "1743", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "1745", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "1746", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1747", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1748", + "resourceId": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "1754", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "1755", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "1756", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "1757", + "autoStopDisabled": { + "$id": "1758", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "1759", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "1760", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "testArtifacts": { + "$id": "1761", + "kind": "model", + "type": { + "$ref": "542" + }, + "value": { + "$id": "1762", + "inputArtifacts": { + "$id": "1763", + "kind": "model", + "type": { + "$ref": "544" + }, + "value": { + "$id": "1764", + "configFileInfo": { + "$id": "1765", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1766", + "url": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1768", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "1771", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1772", + "url": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1774", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "1778", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1779", + "url": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1781", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "1784", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1785", + "url": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1789", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "1790", + "kind": "array", + "type": { + "$ref": "563" + }, + "value": [] + } + } + }, + "outputArtifacts": { + "$id": "1791", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "1792", + "resultFileInfo": { + "$id": "1793", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1794", + "url": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "results.zip" + }, + "fileType": { + "$id": "1797", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1798", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1799", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "logsFileInfo": { + "$id": "1800", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1801", + "url": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "1803", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "worker.log" + }, + "fileType": { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2022-05-16T09:14:46.0411793+00:00" + } + } + } + } + } + } + }, + "executedDateTime": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "virtualUsers": { + "$id": "1807", + "kind": "number", + "type": { + "$ref": "578" + }, + "value": 4 + }, + "testRunStatistics": { + "$id": "1808", + "kind": "dict", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1809", + "Total": { + "$id": "1810", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1811", + "transaction": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "Total" + }, + "sampleCount": { + "$id": "1813", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 18 + }, + "errorCount": { + "$id": "1814", + "kind": "number", + "type": { + "$ref": "502" + }, + "value": 19 + }, + "errorPct": { + "$id": "1815", + "kind": "number", + "type": { + "$ref": "504" + }, + "value": 17 + }, + "meanResTime": { + "$id": "1816", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 13 + }, + "medianResTime": { + "$id": "1817", + "kind": "number", + "type": { + "$ref": "508" + }, + "value": 10 + }, + "maxResTime": { + "$id": "1818", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 16 + }, + "minResTime": { + "$id": "1819", + "kind": "number", + "type": { + "$ref": "512" + }, + "value": 18 + }, + "pct1ResTime": { + "$id": "1820", + "kind": "number", + "type": { + "$ref": "514" + }, + "value": 27 + }, + "pct2ResTime": { + "$id": "1821", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + }, + "pct3ResTime": { + "$id": "1822", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 3 + }, + "throughput": { + "$id": "1823", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 5 + }, + "receivedKBytesPerSec": { + "$id": "1824", + "kind": "number", + "type": { + "$ref": "534" + }, + "value": 13 + }, + "sentKBytesPerSec": { + "$id": "1825", + "kind": "number", + "type": { + "$ref": "536" + }, + "value": 4 + } + } + } + } + }, + "createdDateTime": { + "$id": "1826", + "kind": "string", + "type": { + "$ref": "611" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1827", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1828", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1829", + "kind": "string", + "type": { + "$ref": "619" + }, + "value": "user@contoso.com" + }, + "portalUrl": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "https://portal.azure.com/dummyresource" + }, + "secrets": { + "$id": "1831", + "kind": "dict", + "type": { + "$ref": "481" + }, + "value": { + "$id": "1832", + "secret1": { + "$id": "1833", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1834", + "value": { + "$id": "1835", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "1837", + "kind": "dict", + "type": { + "$ref": "485" + }, + "value": { + "$id": "1838", + "envvar1": { + "$id": "1839", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "sampletext" + } + } + }, + "duration": { + "$id": "1840", + "kind": "number", + "type": { + "$ref": "598" + }, + "value": 18 + }, + "subnetId": { + "$id": "1841", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "debugLogsEnabled": { + "$id": "1842", + "kind": "boolean", + "type": { + "$ref": "606" + }, + "value": true + }, + "requestDataLevel": { + "$id": "1843", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "NONE" + } + } + } + }, + { + "$id": "1844", + "response": { + "$ref": "1660" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1845", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "1846", + "testRunId": { + "$id": "1847", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "1848", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "Performance_LoadTest_Run1" + }, + "testId": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "582" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "sample description" + }, + "status": { + "$id": "1851", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "ACCEPTED" + }, + "startDateTime": { + "$id": "1852", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "endDateTime": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "590" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "loadTestConfiguration": { + "$id": "1854", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "1855", + "engineInstances": { + "$id": "1856", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "1857", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "testResult": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "PASSED" + }, + "passFailCriteria": { + "$id": "1859", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "1860", + "passFailMetrics": { + "$id": "1861", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1862", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "1863", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1864", + "clientMetric": { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "1868", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "1869", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "1870", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "1873", + "autoStopDisabled": { + "$id": "1874", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "1875", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "1876", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "testArtifacts": { + "$id": "1877", + "kind": "model", + "type": { + "$ref": "542" + }, + "value": { + "$id": "1878", + "inputArtifacts": { + "$id": "1879", + "kind": "model", + "type": { + "$ref": "544" + }, + "value": { + "$id": "1880", + "configFileInfo": { + "$id": "1881", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1882", + "url": { + "$id": "1883", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/configresource" + }, + "fileName": { + "$id": "1884", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1886", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "1887", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1888", + "url": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/testscriptresource" + }, + "fileName": { + "$id": "1890", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "1891", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "1892", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "1894", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1895", + "url": { + "$id": "1896", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/userpropresource" + }, + "fileName": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "1899", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "1900", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1901", + "url": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/inputartifactzipresource" + }, + "fileName": { + "$id": "1903", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "1904", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "1906", + "kind": "array", + "type": { + "$ref": "563" + }, + "value": [] + } + } + }, + "outputArtifacts": { + "$id": "1907", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "1908", + "resultFileInfo": { + "$id": "1909", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1910", + "url": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/dummyresourceresult" + }, + "fileName": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "results.zip" + }, + "fileType": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "logsFileInfo": { + "$id": "1916", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "1917", + "url": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/logresource" + }, + "fileName": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "worker.log" + }, + "fileType": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2022-05-16T09:14:46.0411793+00:00" + } + } + } + } + } + } + }, + "executedDateTime": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "virtualUsers": { + "$id": "1923", + "kind": "number", + "type": { + "$ref": "578" + }, + "value": 4 + }, + "testRunStatistics": { + "$id": "1924", + "kind": "dict", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1925", + "Total": { + "$id": "1926", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1927", + "transaction": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "Total" + }, + "sampleCount": { + "$id": "1929", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 18 + }, + "errorCount": { + "$id": "1930", + "kind": "number", + "type": { + "$ref": "502" + }, + "value": 19 + }, + "errorPct": { + "$id": "1931", + "kind": "number", + "type": { + "$ref": "504" + }, + "value": 17 + }, + "meanResTime": { + "$id": "1932", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 13 + }, + "medianResTime": { + "$id": "1933", + "kind": "number", + "type": { + "$ref": "508" + }, + "value": 10 + }, + "maxResTime": { + "$id": "1934", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 16 + }, + "minResTime": { + "$id": "1935", + "kind": "number", + "type": { + "$ref": "512" + }, + "value": 18 + }, + "pct1ResTime": { + "$id": "1936", + "kind": "number", + "type": { + "$ref": "514" + }, + "value": 27 + }, + "pct2ResTime": { + "$id": "1937", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + }, + "pct3ResTime": { + "$id": "1938", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 3 + }, + "throughput": { + "$id": "1939", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 5 + }, + "receivedKBytesPerSec": { + "$id": "1940", + "kind": "number", + "type": { + "$ref": "534" + }, + "value": 13 + }, + "sentKBytesPerSec": { + "$id": "1941", + "kind": "number", + "type": { + "$ref": "536" + }, + "value": 4 + } + } + } + } + }, + "createdDateTime": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "611" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "1943", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "1945", + "kind": "string", + "type": { + "$ref": "619" + }, + "value": "user@contoso.com" + }, + "portalUrl": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "https://portal.azure.com/dummyresource" + }, + "secrets": { + "$id": "1947", + "kind": "dict", + "type": { + "$ref": "481" + }, + "value": { + "$id": "1948", + "secret1": { + "$id": "1949", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1950", + "value": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "1953", + "kind": "dict", + "type": { + "$ref": "485" + }, + "value": { + "$id": "1954", + "envvar1": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "sampletext" + } + } + }, + "duration": { + "$id": "1956", + "kind": "number", + "type": { + "$ref": "598" + }, + "value": 18 + }, + "subnetId": { + "$id": "1957", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "debugLogsEnabled": { + "$id": "1958", + "kind": "boolean", + "type": { + "$ref": "606" + }, + "value": true + }, + "requestDataLevel": { + "$id": "1959", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "NONE" + } + } + } + } + ] + } + ] + }, + { + "$id": "1960", + "Name": "createOrUpdateAppComponents", + "ResourceName": "TestRunOperations", + "Summary": "Add an app component to a test run.", + "Description": "Add an app component to a test run by providing the resource Id, name and type.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1961", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "1962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1963", + "Type": { + "$id": "1964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1965", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Content type.", + "Type": { + "$id": "1966", + "kind": "constant", + "valueType": { + "$id": "1967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1968", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique Id for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "1969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1970", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1971", + "kind": "constant", + "valueType": { + "$id": "1972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "1973", + "Name": "body", + "NameInRequest": "body", + "Description": "App Component model.", + "Type": { + "$ref": "620" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1974", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "620" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1975", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "620" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/app-components", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.createOrUpdateAppComponents", + "Decorators": [], + "Examples": [ + { + "$id": "1976", + "kind": "http", + "name": "Add or update app components to a load test run", + "description": "Add or update app components to a load test run", + "filePath": "2024-12-01-preview/CreateOrUpdateTestRunAppComponents.json", + "parameters": [ + { + "$id": "1977", + "parameter": { + "$ref": "1968" + }, + "value": { + "$id": "1978", + "kind": "string", + "type": { + "$ref": "1969" + }, + "value": "ee843bd9-a6d4-4364-a45c-427a03c39fa7" + } + }, + { + "$id": "1979", + "parameter": { + "$ref": "1961" + }, + "value": { + "$id": "1980", + "kind": "string", + "type": { + "$ref": "1962" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "1981", + "parameter": { + "$ref": "1973" + }, + "value": { + "$id": "1982", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "1983", + "components": { + "$id": "1984", + "kind": "dict", + "type": { + "$ref": "622" + }, + "value": { + "$id": "1985", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "1986", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1987", + "resourceType": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "1989", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "1990", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "kind": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1992", + "response": { + "$ref": "1975" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1993", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "1994", + "testRunId": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "components": { + "$id": "1996", + "kind": "dict", + "type": { + "$ref": "622" + }, + "value": { + "$id": "1997", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "1998", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1999", + "resourceId": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "417" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "resourceType": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "2003", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "resourceGroup": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "samplerg" + }, + "subscriptionId": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "00000000-0000-0000-0000-000000000000" + }, + "kind": { + "$id": "2006", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + }, + "createdDateTime": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "627" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "630" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "user@contoso.com" + } + } + } + }, + { + "$id": "2011", + "response": { + "$ref": "1974" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2012", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "2013", + "testRunId": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "components": { + "$id": "2015", + "kind": "dict", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2016", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "2017", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2018", + "resourceId": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "417" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "resourceType": { + "$id": "2020", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "2022", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "resourceGroup": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "samplerg" + }, + "subscriptionId": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "00000000-0000-0000-0000-000000000000" + }, + "kind": { + "$id": "2025", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + }, + "createdDateTime": { + "$id": "2026", + "kind": "string", + "type": { + "$ref": "627" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "630" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2028", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2029", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "2030", + "Name": "createOrUpdateServerMetricsConfig", + "ResourceName": "TestRunOperations", + "Summary": "Configure server metrics for a test run", + "Description": "Configure server metrics for a test run", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2031", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2033", + "Type": { + "$id": "2034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2035", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Content type.", + "Type": { + "$id": "2036", + "kind": "constant", + "valueType": { + "$id": "2037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2038", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique Id for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2040", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2041", + "kind": "constant", + "valueType": { + "$id": "2042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2043", + "Name": "body", + "NameInRequest": "body", + "Description": "Server metric configuration model.", + "Type": { + "$ref": "636" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2044", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "636" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2045", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "636" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/server-metrics-config", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.createOrUpdateServerMetricsConfig", + "Decorators": [], + "Examples": [ + { + "$id": "2046", + "kind": "http", + "name": "Add or update server metrics configuration for a load test run", + "description": "Add or update server metrics configuration for a load test run", + "filePath": "2024-12-01-preview/CreateOrUpdateTestRunServerMetricsConfig.json", + "parameters": [ + { + "$id": "2047", + "parameter": { + "$ref": "2038" + }, + "value": { + "$id": "2048", + "kind": "string", + "type": { + "$ref": "2039" + }, + "value": "edc6e529-d009-4b99-b763-ca492e3a2823" + } + }, + { + "$id": "2049", + "parameter": { + "$ref": "2031" + }, + "value": { + "$id": "2050", + "kind": "string", + "type": { + "$ref": "2032" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "2051", + "parameter": { + "$ref": "2043" + }, + "value": { + "$id": "2052", + "kind": "model", + "type": { + "$ref": "636" + }, + "value": { + "$id": "2053", + "metrics": { + "$id": "2054", + "kind": "dict", + "type": { + "$ref": "640" + }, + "value": { + "$id": "2055", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "2056", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "2057", + "resourceId": { + "$id": "2058", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "2059", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "2060", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "2061", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "2062", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "2063", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2064", + "response": { + "$ref": "2045" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2065", + "kind": "model", + "type": { + "$ref": "636" + }, + "value": { + "$id": "2066", + "testRunId": { + "$id": "2067", + "kind": "string", + "type": { + "$ref": "638" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "metrics": { + "$id": "2068", + "kind": "dict", + "type": { + "$ref": "640" + }, + "value": { + "$id": "2069", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "2070", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "2071", + "id": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "450" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration" + }, + "resourceId": { + "$id": "2073", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "2075", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "2076", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "2077", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + }, + "createdDateTime": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "643" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2082", + "kind": "string", + "type": { + "$ref": "651" + }, + "value": "user@contoso.com" + } + } + } + }, + { + "$id": "2083", + "response": { + "$ref": "2044" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2084", + "kind": "model", + "type": { + "$ref": "636" + }, + "value": { + "$id": "2085", + "testRunId": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "638" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "metrics": { + "$id": "2087", + "kind": "dict", + "type": { + "$ref": "640" + }, + "value": { + "$id": "2088", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "2089", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "2090", + "id": { + "$id": "2091", + "kind": "string", + "type": { + "$ref": "450" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration" + }, + "resourceId": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "2093", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "2095", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "2097", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + }, + "createdDateTime": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "643" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2099", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2100", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "651" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "2102", + "Name": "deleteTestRun", + "ResourceName": "TestRun", + "Summary": "Delete an existing load test run.", + "Description": "Delete an existing load test run by providing the testRunId.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2103", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2105", + "Type": { + "$id": "2106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2107", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "2108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2109", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2110", + "kind": "constant", + "valueType": { + "$id": "2111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2112", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.deleteTestRun", + "Decorators": [], + "Examples": [ + { + "$id": "2113", + "kind": "http", + "name": "Delete a load test run", + "description": "Delete a load test run", + "filePath": "2024-12-01-preview/DeleteTestRun.json", + "parameters": [ + { + "$id": "2114", + "parameter": { + "$ref": "2107" + }, + "value": { + "$id": "2115", + "kind": "string", + "type": { + "$ref": "2108" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2116", + "parameter": { + "$ref": "2103" + }, + "value": { + "$id": "2117", + "kind": "string", + "type": { + "$ref": "2104" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2118", + "response": { + "$ref": "2112" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2119", + "Name": "getAppComponents", + "ResourceName": "TestRunOperations", + "Summary": "Get associated app component (collection of azure resources) for the given test\nrun.", + "Description": "Get associated app component (collection of azure resources) for the given test\nrun.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2120", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2122", + "Type": { + "$id": "2123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2124", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique name for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2126", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2127", + "kind": "constant", + "valueType": { + "$id": "2128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2129", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "620" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/app-components", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.getAppComponents", + "Decorators": [], + "Examples": [ + { + "$id": "2130", + "kind": "http", + "name": "Get associated app component for the given test run.", + "description": "Get associated app component for the given test run.", + "filePath": "2024-12-01-preview/ListTestRunAppComponents.json", + "parameters": [ + { + "$id": "2131", + "parameter": { + "$ref": "2124" + }, + "value": { + "$id": "2132", + "kind": "string", + "type": { + "$ref": "2125" + }, + "value": "ee843bd9-a6d4-4364-a45c-427a03c39fa7" + } + }, + { + "$id": "2133", + "parameter": { + "$ref": "2120" + }, + "value": { + "$id": "2134", + "kind": "string", + "type": { + "$ref": "2121" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2135", + "response": { + "$ref": "2129" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2136", + "kind": "model", + "type": { + "$ref": "620" + }, + "value": { + "$id": "2137", + "testRunId": { + "$id": "2138", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "components": { + "$id": "2139", + "kind": "dict", + "type": { + "$ref": "622" + }, + "value": { + "$id": "2140", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": { + "$id": "2141", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2142", + "resourceId": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "417" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "resourceType": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "microsoft.insights/components" + }, + "resourceName": { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "appcomponentresource" + }, + "displayName": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "Performance_LoadTest_Insights" + }, + "resourceGroup": { + "$id": "2147", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "samplerg" + }, + "subscriptionId": { + "$id": "2148", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "00000000-0000-0000-0000-000000000000" + }, + "kind": { + "$id": "2149", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "web" + } + } + } + } + }, + "createdDateTime": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "627" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "630" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "2154", + "Name": "getServerMetricsConfig", + "ResourceName": "TestRunOperations", + "Summary": "Get associated server metrics configuration for the given test run.", + "Description": "Get associated server metrics configuration for the given test run.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2155", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2157", + "Type": { + "$id": "2158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2159", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique name for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2161", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2162", + "kind": "constant", + "valueType": { + "$id": "2163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2164", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "636" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/server-metrics-config", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.getServerMetricsConfig", + "Decorators": [], + "Examples": [ + { + "$id": "2165", + "kind": "http", + "name": "List server metrics configuration for the given test run.", + "description": "List server metrics configuration for the given test run.", + "filePath": "2024-12-01-preview/ListTestRunServerMetricsConfig.json", + "parameters": [ + { + "$id": "2166", + "parameter": { + "$ref": "2159" + }, + "value": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "2160" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "2168", + "parameter": { + "$ref": "2155" + }, + "value": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "2156" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2170", + "response": { + "$ref": "2164" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2171", + "kind": "model", + "type": { + "$ref": "636" + }, + "value": { + "$id": "2172", + "testRunId": { + "$id": "2173", + "kind": "string", + "type": { + "$ref": "638" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "metrics": { + "$id": "2174", + "kind": "dict", + "type": { + "$ref": "640" + }, + "value": { + "$id": "2175", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": { + "$id": "2176", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "2177", + "id": { + "$id": "2178", + "kind": "string", + "type": { + "$ref": "450" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration" + }, + "resourceId": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "452" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource" + }, + "metricNamespace": { + "$id": "2180", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "microsoft.insights/components" + }, + "displayDescription": { + "$id": "2181", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "sample description" + }, + "name": { + "$id": "2182", + "kind": "string", + "type": { + "$ref": "458" + }, + "value": "requests/duration" + }, + "aggregation": { + "$id": "2183", + "kind": "string", + "type": { + "$ref": "460" + }, + "value": "Average" + }, + "resourceType": { + "$id": "2184", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "microsoft.insights/components" + } + } + } + } + }, + "createdDateTime": { + "$id": "2185", + "kind": "string", + "type": { + "$ref": "643" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2186", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2187", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2188", + "kind": "string", + "type": { + "$ref": "651" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "2189", + "Name": "getTestRun", + "ResourceName": "TestRun", + "Summary": "Get test run details by test run Id.", + "Description": "Get test run details by test run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2190", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2192", + "Type": { + "$id": "2193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2194", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "2195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2196", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2197", + "kind": "constant", + "valueType": { + "$id": "2198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2199", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "475" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.getTestRun", + "Decorators": [], + "Examples": [ + { + "$id": "2200", + "kind": "http", + "name": "Get a load test run.", + "description": "Get a load test run.", + "filePath": "2024-12-01-preview/GetTestRun.json", + "parameters": [ + { + "$id": "2201", + "parameter": { + "$ref": "2194" + }, + "value": { + "$id": "2202", + "kind": "string", + "type": { + "$ref": "2195" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2203", + "parameter": { + "$ref": "2190" + }, + "value": { + "$id": "2204", + "kind": "string", + "type": { + "$ref": "2191" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2205", + "response": { + "$ref": "2199" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2206", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2207", + "testRunId": { + "$id": "2208", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "Performance_LoadTest_Run1" + }, + "testId": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "582" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "2211", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "sample description" + }, + "status": { + "$id": "2212", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "startDateTime": { + "$id": "2213", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "endDateTime": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "590" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "loadTestConfiguration": { + "$id": "2215", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "2216", + "engineInstances": { + "$id": "2217", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "2218", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "testResult": { + "$id": "2219", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "PASSED" + }, + "passFailCriteria": { + "$id": "2220", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "2221", + "passFailMetrics": { + "$id": "2222", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "2223", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "2224", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "2225", + "clientMetric": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "2229", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "2231", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "2233", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "2234", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "2235", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "2236", + "resourceId": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "2238", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "2239", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "2240", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "2241", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "2242", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "2243", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "2244", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "2245", + "autoStopDisabled": { + "$id": "2246", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "2247", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "2248", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "testArtifacts": { + "$id": "2249", + "kind": "model", + "type": { + "$ref": "542" + }, + "value": { + "$id": "2250", + "inputArtifacts": { + "$id": "2251", + "kind": "model", + "type": { + "$ref": "544" + }, + "value": { + "$id": "2252", + "configFileInfo": { + "$id": "2253", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2254", + "url": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "2259", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2260", + "url": { + "$id": "2261", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "2263", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "2265", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "2266", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2267", + "url": { + "$id": "2268", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "2270", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "2271", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "2272", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2273", + "url": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2275", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "2278", + "kind": "array", + "type": { + "$ref": "563" + }, + "value": [] + } + } + }, + "outputArtifacts": { + "$id": "2279", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "2280", + "resultFileInfo": { + "$id": "2281", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2282", + "url": { + "$id": "2283", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2284", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "2285", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "logsFileInfo": { + "$id": "2288", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2289", + "url": { + "$id": "2290", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2291", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "worker.log" + }, + "fileType": { + "$id": "2292", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2022-05-16T09:14:46.0411793+00:00" + } + } + }, + "reportFileInfo": { + "$id": "2294", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2295", + "url": { + "$id": "2296", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "2297", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "worker.log" + }, + "fileType": { + "$id": "2298", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "2299", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2022-05-16T09:14:46.0411793+00:00" + } + } + } + } + } + } + }, + "executedDateTime": { + "$id": "2300", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "virtualUsers": { + "$id": "2301", + "kind": "number", + "type": { + "$ref": "578" + }, + "value": 4 + }, + "virtualUserHours": { + "$id": "2302", + "kind": "number", + "type": { + "$ref": "600" + }, + "value": 20.5 + }, + "testRunStatistics": { + "$id": "2303", + "kind": "dict", + "type": { + "$ref": "494" + }, + "value": { + "$id": "2304", + "Total": { + "$id": "2305", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2306", + "transaction": { + "$id": "2307", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "Total" + }, + "sampleCount": { + "$id": "2308", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 18 + }, + "errorCount": { + "$id": "2309", + "kind": "number", + "type": { + "$ref": "502" + }, + "value": 19 + }, + "errorPct": { + "$id": "2310", + "kind": "number", + "type": { + "$ref": "504" + }, + "value": 17 + }, + "meanResTime": { + "$id": "2311", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 13 + }, + "medianResTime": { + "$id": "2312", + "kind": "number", + "type": { + "$ref": "508" + }, + "value": 10 + }, + "maxResTime": { + "$id": "2313", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 16 + }, + "minResTime": { + "$id": "2314", + "kind": "number", + "type": { + "$ref": "512" + }, + "value": 18 + }, + "pct1ResTime": { + "$id": "2315", + "kind": "number", + "type": { + "$ref": "514" + }, + "value": 27 + }, + "pct2ResTime": { + "$id": "2316", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + }, + "pct3ResTime": { + "$id": "2317", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 3 + }, + "throughput": { + "$id": "2318", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 5 + }, + "receivedKBytesPerSec": { + "$id": "2319", + "kind": "number", + "type": { + "$ref": "534" + }, + "value": 13 + }, + "sentKBytesPerSec": { + "$id": "2320", + "kind": "number", + "type": { + "$ref": "536" + }, + "value": 4 + } + } + } + } + }, + "createdDateTime": { + "$id": "2321", + "kind": "string", + "type": { + "$ref": "611" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "2322", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "2323", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "2324", + "kind": "string", + "type": { + "$ref": "619" + }, + "value": "user@contoso.com" + }, + "portalUrl": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "https://portal.azure.com/dummyresource" + }, + "secrets": { + "$id": "2326", + "kind": "dict", + "type": { + "$ref": "481" + }, + "value": { + "$id": "2327", + "secret1": { + "$id": "2328", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "2329", + "value": { + "$id": "2330", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "2332", + "kind": "dict", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2333", + "envvar1": { + "$id": "2334", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "sampletext" + } + } + }, + "duration": { + "$id": "2335", + "kind": "number", + "type": { + "$ref": "598" + }, + "value": 18 + }, + "subnetId": { + "$id": "2336", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + }, + "debugLogsEnabled": { + "$id": "2337", + "kind": "boolean", + "type": { + "$ref": "606" + }, + "value": true + }, + "requestDataLevel": { + "$id": "2338", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "NONE" + } + } + } + } + ] + } + ] + }, + { + "$id": "2339", + "Name": "getTestRunFile", + "ResourceName": "TestRunFileInfo", + "Summary": "Get test run file by file name.", + "Description": "Get test run file by file name.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2340", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2342", + "Type": { + "$id": "2343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2344", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "2345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2346", + "Name": "fileName", + "NameInRequest": "fileName", + "Description": "Name of the file.", + "Type": { + "$id": "2347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2348", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2349", + "kind": "constant", + "valueType": { + "$id": "2350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2351", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "546" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/files/{fileName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.getTestRunFile", + "Decorators": [], + "Examples": [ + { + "$id": "2352", + "kind": "http", + "name": "Get a file associated to a load test run.", + "description": "Get a file associated to a load test run.", + "filePath": "2024-12-01-preview/GetTestRunFile.json", + "parameters": [ + { + "$id": "2353", + "parameter": { + "$ref": "2344" + }, + "value": { + "$id": "2354", + "kind": "string", + "type": { + "$ref": "2345" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2355", + "parameter": { + "$ref": "2346" + }, + "value": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "2347" + }, + "value": "sample.jmx" + } + }, + { + "$id": "2357", + "parameter": { + "$ref": "2340" + }, + "value": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "2341" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2359", + "response": { + "$ref": "2351" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2360", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "2361", + "url": { + "$id": "2362", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://dummyurl.com/testscriptresource" + }, + "fileName": { + "$id": "2363", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "2364", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "2365", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "2366", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + } + } + ] + } + ] + }, + { + "$id": "2367", + "Name": "listMetricDimensionValues", + "ResourceName": "TestRunOperations", + "Summary": "List the dimension values for the given metric dimension name.", + "Description": "List the dimension values for the given metric dimension name.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2368", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2370", + "Type": { + "$id": "2371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2372", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique name for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2374", + "Name": "name", + "NameInRequest": "name", + "Description": "Dimension name", + "Type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2376", + "Name": "metricname", + "NameInRequest": "metricname", + "Description": "Metric name", + "Type": { + "$id": "2377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2378", + "Name": "interval", + "NameInRequest": "interval", + "Description": "The interval (i.e. timegrain) of the query.", + "Type": { + "$ref": "178" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2379", + "Name": "metricNamespace", + "NameInRequest": "metricNamespace", + "Description": "Metric namespace to query metric definitions for.", + "Type": { + "$id": "2380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2381", + "Name": "timespan", + "NameInRequest": "timespan", + "Description": "The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", + "Type": { + "$id": "2382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2383", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2384", + "kind": "constant", + "valueType": { + "$id": "2385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2386", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "652" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/metric-dimensions/{name}/values", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.listMetricDimensionValues", + "Decorators": [], + "Examples": [ + { + "$id": "2387", + "kind": "http", + "name": "List the dimension values for the given metric dimension name.", + "description": "List the dimension values for the given metric dimension name.", + "filePath": "2024-12-01-preview/ListMetricDimensionValues.json", + "parameters": [ + { + "$id": "2388", + "parameter": { + "$ref": "2372" + }, + "value": { + "$id": "2389", + "kind": "string", + "type": { + "$ref": "2373" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2390", + "parameter": { + "$ref": "2378" + }, + "value": { + "$id": "2391", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1H" + } + }, + { + "$id": "2392", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2393", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "SamplerName" + } + }, + { + "$id": "2394", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "ActiveThreads" + } + }, + { + "$id": "2396", + "parameter": { + "$ref": "2379" + }, + "value": { + "$id": "2397", + "kind": "string", + "type": { + "$ref": "2380" + }, + "value": "LoadTestRunMetrics" + } + }, + { + "$id": "2398", + "parameter": { + "$ref": "2381" + }, + "value": { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "2382" + }, + "value": "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z" + } + }, + { + "$id": "2400", + "parameter": { + "$ref": "2368" + }, + "value": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "2369" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2402", + "response": { + "$ref": "2386" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2403", + "kind": "model", + "type": { + "$ref": "652" + }, + "value": { + "$id": "2404", + "value": { + "$id": "2405", + "kind": "array", + "type": { + "$ref": "656" + }, + "value": [ + { + "$id": "2406", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "HighLoadTest" + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2407", + "Name": "listMetricDefinitions", + "ResourceName": "TestRunOperations", + "Summary": "List the metric definitions for a load test run.", + "Description": "List the metric definitions for a load test run.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2408", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2410", + "Type": { + "$id": "2411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2412", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique name for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2414", + "Name": "metricNamespace", + "NameInRequest": "metricNamespace", + "Description": "Metric namespace to query metric definitions for.", + "Type": { + "$id": "2415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2416", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2417", + "kind": "constant", + "valueType": { + "$id": "2418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2419", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "661" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/metric-definitions", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.listMetricDefinitions", + "Decorators": [], + "Examples": [ + { + "$id": "2420", + "kind": "http", + "name": "List the metric definitions for a load test run.", + "description": "List the metric definitions for a load test run.", + "filePath": "2024-12-01-preview/ListTestRunMetricsDefinitions.json", + "parameters": [ + { + "$id": "2421", + "parameter": { + "$ref": "2412" + }, + "value": { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "2413" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2423", + "parameter": { + "$ref": "2414" + }, + "value": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "2415" + }, + "value": "LoadTestRunMetrics" + } + }, + { + "$id": "2425", + "parameter": { + "$ref": "2408" + }, + "value": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "2409" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2427", + "response": { + "$ref": "2419" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2428", + "kind": "model", + "type": { + "$ref": "661" + }, + "value": { + "$id": "2429", + "value": { + "$id": "2430", + "kind": "array", + "type": { + "$ref": "663" + }, + "value": [ + { + "$id": "2431", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2432", + "dimensions": { + "$id": "2433", + "kind": "array", + "type": { + "$ref": "666" + }, + "value": [ + { + "$id": "2434", + "kind": "model", + "type": { + "$ref": "667" + }, + "value": { + "$id": "2435", + "description": { + "$id": "2436", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "Sampler Name" + }, + "name": { + "$id": "2437", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "SamplerName" + } + } + } + ] + }, + "description": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "673" + }, + "value": "No of concurrent virtual users" + }, + "name": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "675" + }, + "value": "VirtualUsers" + }, + "namespace": { + "$id": "2440", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "LoadTestRunMetrics" + }, + "primaryAggregationType": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Total" + }, + "supportedAggregationTypes": { + "$id": "2442", + "kind": "array", + "type": { + "$ref": "680" + }, + "value": [ + { + "$id": "2443", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Total" + } + ] + }, + "unit": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Count" + }, + "metricAvailabilities": { + "$id": "2445", + "kind": "array", + "type": { + "$ref": "684" + }, + "value": [ + { + "$id": "2446", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2447", + "timeGrain": { + "$id": "2448", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5S" + } + } + }, + { + "$id": "2449", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2450", + "timeGrain": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT10S" + } + } + }, + { + "$id": "2452", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2453", + "timeGrain": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1M" + } + } + }, + { + "$id": "2455", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2456", + "timeGrain": { + "$id": "2457", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5M" + } + } + }, + { + "$id": "2458", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2459", + "timeGrain": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1H" + } + } + } + ] + } + } + }, + { + "$id": "2461", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2462", + "dimensions": { + "$id": "2463", + "kind": "array", + "type": { + "$ref": "666" + }, + "value": [ + { + "$id": "2464", + "kind": "model", + "type": { + "$ref": "667" + }, + "value": { + "$id": "2465", + "description": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "Sampler Name" + }, + "name": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "SamplerName" + } + } + } + ] + }, + "description": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "673" + }, + "value": "Response time (Successful request)" + }, + "name": { + "$id": "2469", + "kind": "string", + "type": { + "$ref": "675" + }, + "value": "ResponseTime" + }, + "namespace": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "LoadTestRunMetrics" + }, + "primaryAggregationType": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Percentile90" + }, + "supportedAggregationTypes": { + "$id": "2472", + "kind": "array", + "type": { + "$ref": "680" + }, + "value": [ + { + "$id": "2473", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Average" + }, + { + "$id": "2474", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Percentile90" + }, + { + "$id": "2475", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Percentile95" + }, + { + "$id": "2476", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Percentile99" + } + ] + }, + "unit": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Milliseconds" + }, + "metricAvailabilities": { + "$id": "2478", + "kind": "array", + "type": { + "$ref": "684" + }, + "value": [ + { + "$id": "2479", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2480", + "timeGrain": { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5S" + } + } + }, + { + "$id": "2482", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2483", + "timeGrain": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT10S" + } + } + }, + { + "$id": "2485", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2486", + "timeGrain": { + "$id": "2487", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1M" + } + } + }, + { + "$id": "2488", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2489", + "timeGrain": { + "$id": "2490", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5M" + } + } + }, + { + "$id": "2491", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2492", + "timeGrain": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1H" + } + } + } + ] + } + } + }, + { + "$id": "2494", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2495", + "dimensions": { + "$id": "2496", + "kind": "array", + "type": { + "$ref": "666" + }, + "value": [ + { + "$id": "2497", + "kind": "model", + "type": { + "$ref": "667" + }, + "value": { + "$id": "2498", + "description": { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "Sampler Name" + }, + "name": { + "$id": "2500", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "SamplerName" + } + } + } + ] + }, + "description": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "673" + }, + "value": "Total Requests" + }, + "name": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "675" + }, + "value": "TotalRequests" + }, + "namespace": { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "LoadTestRunMetrics" + }, + "primaryAggregationType": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Total" + }, + "supportedAggregationTypes": { + "$id": "2505", + "kind": "array", + "type": { + "$ref": "680" + }, + "value": [ + { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Total" + } + ] + }, + "unit": { + "$id": "2507", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Count" + }, + "metricAvailabilities": { + "$id": "2508", + "kind": "array", + "type": { + "$ref": "684" + }, + "value": [ + { + "$id": "2509", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2510", + "timeGrain": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5S" + } + } + }, + { + "$id": "2512", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2513", + "timeGrain": { + "$id": "2514", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT10S" + } + } + }, + { + "$id": "2515", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2516", + "timeGrain": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1M" + } + } + }, + { + "$id": "2518", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2519", + "timeGrain": { + "$id": "2520", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5M" + } + } + }, + { + "$id": "2521", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2522", + "timeGrain": { + "$id": "2523", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1H" + } + } + } + ] + } + } + }, + { + "$id": "2524", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2525", + "dimensions": { + "$id": "2526", + "kind": "array", + "type": { + "$ref": "666" + }, + "value": [ + { + "$id": "2527", + "kind": "model", + "type": { + "$ref": "667" + }, + "value": { + "$id": "2528", + "description": { + "$id": "2529", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "Sampler Name" + }, + "name": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "SamplerName" + } + } + }, + { + "$id": "2531", + "kind": "model", + "type": { + "$ref": "667" + }, + "value": { + "$id": "2532", + "description": { + "$id": "2533", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "Error response code" + }, + "name": { + "$id": "2534", + "kind": "string", + "type": { + "$ref": "671" + }, + "value": "Errors" + } + } + } + ] + }, + "description": { + "$id": "2535", + "kind": "string", + "type": { + "$ref": "673" + }, + "value": "Total Errors" + }, + "name": { + "$id": "2536", + "kind": "string", + "type": { + "$ref": "675" + }, + "value": "Errors" + }, + "namespace": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "LoadTestRunMetrics" + }, + "primaryAggregationType": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Total" + }, + "supportedAggregationTypes": { + "$id": "2539", + "kind": "array", + "type": { + "$ref": "680" + }, + "value": [ + { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "Total" + } + ] + }, + "unit": { + "$id": "2541", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Count" + }, + "metricAvailabilities": { + "$id": "2542", + "kind": "array", + "type": { + "$ref": "684" + }, + "value": [ + { + "$id": "2543", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2544", + "timeGrain": { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5S" + } + } + }, + { + "$id": "2546", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2547", + "timeGrain": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT10S" + } + } + }, + { + "$id": "2549", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2550", + "timeGrain": { + "$id": "2551", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1M" + } + } + }, + { + "$id": "2552", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2553", + "timeGrain": { + "$id": "2554", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT5M" + } + } + }, + { + "$id": "2555", + "kind": "model", + "type": { + "$ref": "685" + }, + "value": { + "$id": "2556", + "timeGrain": { + "$id": "2557", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1H" + } + } + } + ] + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2558", + "Name": "listMetricNamespaces", + "ResourceName": "TestRunOperations", + "Summary": "List the metric namespaces for a load test run.", + "Description": "List the metric namespaces for a load test run.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2559", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2561", + "Type": { + "$id": "2562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2563", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique name for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2565", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2566", + "kind": "constant", + "valueType": { + "$id": "2567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2568", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "687" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/metric-namespaces", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.listMetricNamespaces", + "Decorators": [], + "Examples": [ + { + "$id": "2569", + "kind": "http", + "name": "List the metric namespaces for a load test run.", + "description": "List the metric namespaces for a load test run.", + "filePath": "2024-12-01-preview/ListTestRunMetricsNamespaces.json", + "parameters": [ + { + "$id": "2570", + "parameter": { + "$ref": "2563" + }, + "value": { + "$id": "2571", + "kind": "string", + "type": { + "$ref": "2564" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2572", + "parameter": { + "$ref": "2559" + }, + "value": { + "$id": "2573", + "kind": "string", + "type": { + "$ref": "2560" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "2574", + "response": { + "$ref": "2568" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2575", + "kind": "model", + "type": { + "$ref": "687" + }, + "value": { + "$id": "2576", + "value": { + "$id": "2577", + "kind": "array", + "type": { + "$ref": "689" + }, + "value": [ + { + "$id": "2578", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2579", + "description": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "Load test run metrics" + }, + "name": { + "$id": "2581", + "kind": "string", + "type": { + "$ref": "694" + }, + "value": "LoadTestRunMetrics" + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2582", + "Name": "listMetrics", + "ResourceName": "TestRunOperations", + "Summary": "List the metric values for a load test run.", + "Description": "List the metric values for a load test run.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2583", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "2584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2585", + "Type": { + "$id": "2586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2587", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique name for the load test run, must contain only lower-case alphabetic,\nnumeric, underscore or hyphen characters.", + "Type": { + "$id": "2588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2589", + "Name": "aggregation", + "NameInRequest": "aggregation", + "Description": "The aggregation", + "Type": { + "$id": "2590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2591", + "Name": "metricname", + "NameInRequest": "metricname", + "Description": "Metric name", + "Type": { + "$id": "2592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2593", + "Name": "interval", + "NameInRequest": "interval", + "Description": "The interval (i.e. timegrain) of the query.", + "Type": { + "$ref": "178" + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2594", + "Name": "metricNamespace", + "NameInRequest": "metricNamespace", + "Description": "Metric namespace to query metric definitions for.", + "Type": { + "$id": "2595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2596", + "Name": "timespan", + "NameInRequest": "timespan", + "Description": "The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", + "Type": { + "$id": "2597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2598", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2599", + "kind": "constant", + "valueType": { + "$id": "2600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2601", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2602", + "kind": "constant", + "valueType": { + "$id": "2603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "2604", + "Name": "body", + "NameInRequest": "body", + "Description": "Metric dimension filter ", + "Type": { + "$ref": "695" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2605", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "704" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}/metrics", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "Paging": { + "$id": "2606", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.listMetrics", + "Decorators": [], + "Examples": [ + { + "$id": "2607", + "kind": "http", + "name": "List the metric values for a load test run.", + "description": "List the metric values for a load test run.", + "filePath": "2024-12-01-preview/ListTestRunMetrics.json", + "parameters": [ + { + "$id": "2608", + "parameter": { + "$ref": "2587" + }, + "value": { + "$id": "2609", + "kind": "string", + "type": { + "$ref": "2588" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "2610", + "parameter": { + "$ref": "2593" + }, + "value": { + "$id": "2611", + "kind": "string", + "type": { + "$ref": "178" + }, + "value": "PT1H" + } + }, + { + "$id": "2612", + "parameter": { + "$ref": "2589" + }, + "value": { + "$id": "2613", + "kind": "string", + "type": { + "$ref": "2590" + }, + "value": "Average" + } + }, + { + "$id": "2614", + "parameter": { + "$ref": "2591" + }, + "value": { + "$id": "2615", + "kind": "string", + "type": { + "$ref": "2592" + }, + "value": "ActiveThreads" + } + }, + { + "$id": "2616", + "parameter": { + "$ref": "2594" + }, + "value": { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "2595" + }, + "value": "LoadTestRunMetrics" + } + }, + { + "$id": "2618", + "parameter": { + "$ref": "2596" + }, + "value": { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "2597" + }, + "value": "2022-09-24T19:00:40Z/2022-09-25T19:28:40Z" + } + }, + { + "$id": "2620", + "parameter": { + "$ref": "2583" + }, + "value": { + "$id": "2621", + "kind": "string", + "type": { + "$ref": "2584" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "2622", + "parameter": { + "$ref": "2604" + }, + "value": { + "$id": "2623", + "kind": "model", + "type": { + "$ref": "695" + }, + "value": { + "$id": "2624", + "filters": { + "$id": "2625", + "kind": "array", + "type": { + "$ref": "697" + }, + "value": [ + { + "$id": "2626", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "2627", + "name": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "700" + }, + "value": "SamplerName" + }, + "values": { + "$id": "2629", + "kind": "array", + "type": { + "$ref": "702" + }, + "value": [ + { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "703" + }, + "value": "HTTP Request" + } + ] + } + } + } + ] + } + } + } + } + ], + "responses": [ + { + "$id": "2631", + "response": { + "$ref": "2605" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2632", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2633", + "value": { + "$id": "2634", + "kind": "array", + "type": { + "$ref": "706" + }, + "value": [ + { + "$id": "2635", + "kind": "model", + "type": { + "$ref": "707" + }, + "value": { + "$id": "2636", + "data": { + "$id": "2637", + "kind": "array", + "type": { + "$ref": "709" + }, + "value": [ + { + "$id": "2638", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2639", + "timestamp": { + "$id": "2640", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:44:40.000Z" + }, + "value": { + "$id": "2641", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 10 + } + } + }, + { + "$id": "2642", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2643", + "timestamp": { + "$id": "2644", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:44:45.000Z" + }, + "value": { + "$id": "2645", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 28 + } + } + }, + { + "$id": "2646", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2647", + "timestamp": { + "$id": "2648", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:44:50.000Z" + }, + "value": { + "$id": "2649", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 45 + } + } + }, + { + "$id": "2650", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2651", + "timestamp": { + "$id": "2652", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:44:55.000Z" + }, + "value": { + "$id": "2653", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2654", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2655", + "timestamp": { + "$id": "2656", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:00.000Z" + }, + "value": { + "$id": "2657", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2658", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2659", + "timestamp": { + "$id": "2660", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:05.000Z" + }, + "value": { + "$id": "2661", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2662", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2663", + "timestamp": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:10.000Z" + }, + "value": { + "$id": "2665", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2666", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2667", + "timestamp": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:15.000Z" + }, + "value": { + "$id": "2669", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2670", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2671", + "timestamp": { + "$id": "2672", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:20.000Z" + }, + "value": { + "$id": "2673", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2674", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2675", + "timestamp": { + "$id": "2676", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:25.000Z" + }, + "value": { + "$id": "2677", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2678", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2679", + "timestamp": { + "$id": "2680", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:30.000Z" + }, + "value": { + "$id": "2681", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2682", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2683", + "timestamp": { + "$id": "2684", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:35.000Z" + }, + "value": { + "$id": "2685", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2686", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2687", + "timestamp": { + "$id": "2688", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:40.000Z" + }, + "value": { + "$id": "2689", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2690", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2691", + "timestamp": { + "$id": "2692", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:45.000Z" + }, + "value": { + "$id": "2693", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2694", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2695", + "timestamp": { + "$id": "2696", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:50.000Z" + }, + "value": { + "$id": "2697", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2698", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2699", + "timestamp": { + "$id": "2700", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:45:55.000Z" + }, + "value": { + "$id": "2701", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2702", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2703", + "timestamp": { + "$id": "2704", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:00.000Z" + }, + "value": { + "$id": "2705", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2706", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2707", + "timestamp": { + "$id": "2708", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:05.000Z" + }, + "value": { + "$id": "2709", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2710", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2711", + "timestamp": { + "$id": "2712", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:10.000Z" + }, + "value": { + "$id": "2713", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2714", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2715", + "timestamp": { + "$id": "2716", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:15.000Z" + }, + "value": { + "$id": "2717", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2718", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2719", + "timestamp": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:20.000Z" + }, + "value": { + "$id": "2721", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2722", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2723", + "timestamp": { + "$id": "2724", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:25.000Z" + }, + "value": { + "$id": "2725", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2726", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2727", + "timestamp": { + "$id": "2728", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:30.000Z" + }, + "value": { + "$id": "2729", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2730", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2731", + "timestamp": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:35.000Z" + }, + "value": { + "$id": "2733", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2734", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2735", + "timestamp": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:40.000Z" + }, + "value": { + "$id": "2737", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2738", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2739", + "timestamp": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:45.000Z" + }, + "value": { + "$id": "2741", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2742", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2743", + "timestamp": { + "$id": "2744", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:50.000Z" + }, + "value": { + "$id": "2745", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2746", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2747", + "timestamp": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:46:55.000Z" + }, + "value": { + "$id": "2749", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2750", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2751", + "timestamp": { + "$id": "2752", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:00.000Z" + }, + "value": { + "$id": "2753", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2754", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2755", + "timestamp": { + "$id": "2756", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:05.000Z" + }, + "value": { + "$id": "2757", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2758", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2759", + "timestamp": { + "$id": "2760", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:10.000Z" + }, + "value": { + "$id": "2761", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2762", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2763", + "timestamp": { + "$id": "2764", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:15.000Z" + }, + "value": { + "$id": "2765", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2766", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2767", + "timestamp": { + "$id": "2768", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:20.000Z" + }, + "value": { + "$id": "2769", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2770", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2771", + "timestamp": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:25.000Z" + }, + "value": { + "$id": "2773", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2774", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2775", + "timestamp": { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:30.000Z" + }, + "value": { + "$id": "2777", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2778", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2779", + "timestamp": { + "$id": "2780", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:35.000Z" + }, + "value": { + "$id": "2781", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2782", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2783", + "timestamp": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:40.000Z" + }, + "value": { + "$id": "2785", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2786", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2787", + "timestamp": { + "$id": "2788", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:45.000Z" + }, + "value": { + "$id": "2789", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2790", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2791", + "timestamp": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:50.000Z" + }, + "value": { + "$id": "2793", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2794", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2795", + "timestamp": { + "$id": "2796", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:47:55.000Z" + }, + "value": { + "$id": "2797", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2798", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2799", + "timestamp": { + "$id": "2800", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:00.000Z" + }, + "value": { + "$id": "2801", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2802", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2803", + "timestamp": { + "$id": "2804", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:05.000Z" + }, + "value": { + "$id": "2805", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2806", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2807", + "timestamp": { + "$id": "2808", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:10.000Z" + }, + "value": { + "$id": "2809", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2810", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2811", + "timestamp": { + "$id": "2812", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:15.000Z" + }, + "value": { + "$id": "2813", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2814", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2815", + "timestamp": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:20.000Z" + }, + "value": { + "$id": "2817", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2818", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2819", + "timestamp": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:25.000Z" + }, + "value": { + "$id": "2821", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2822", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2823", + "timestamp": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:30.000Z" + }, + "value": { + "$id": "2825", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2826", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2827", + "timestamp": { + "$id": "2828", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:35.000Z" + }, + "value": { + "$id": "2829", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2830", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2831", + "timestamp": { + "$id": "2832", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:40.000Z" + }, + "value": { + "$id": "2833", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2834", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2835", + "timestamp": { + "$id": "2836", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:45.000Z" + }, + "value": { + "$id": "2837", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2838", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2839", + "timestamp": { + "$id": "2840", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:50.000Z" + }, + "value": { + "$id": "2841", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2842", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2843", + "timestamp": { + "$id": "2844", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:48:55.000Z" + }, + "value": { + "$id": "2845", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2846", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2847", + "timestamp": { + "$id": "2848", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:00.000Z" + }, + "value": { + "$id": "2849", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2850", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2851", + "timestamp": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:05.000Z" + }, + "value": { + "$id": "2853", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2854", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2855", + "timestamp": { + "$id": "2856", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:10.000Z" + }, + "value": { + "$id": "2857", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2858", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2859", + "timestamp": { + "$id": "2860", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:15.000Z" + }, + "value": { + "$id": "2861", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2862", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2863", + "timestamp": { + "$id": "2864", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:20.000Z" + }, + "value": { + "$id": "2865", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2866", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2867", + "timestamp": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:25.000Z" + }, + "value": { + "$id": "2869", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2870", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2871", + "timestamp": { + "$id": "2872", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:30.000Z" + }, + "value": { + "$id": "2873", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2874", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2875", + "timestamp": { + "$id": "2876", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:35.000Z" + }, + "value": { + "$id": "2877", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2878", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2879", + "timestamp": { + "$id": "2880", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:40.000Z" + }, + "value": { + "$id": "2881", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2882", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2883", + "timestamp": { + "$id": "2884", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:45.000Z" + }, + "value": { + "$id": "2885", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2886", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2887", + "timestamp": { + "$id": "2888", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:50.000Z" + }, + "value": { + "$id": "2889", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2890", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2891", + "timestamp": { + "$id": "2892", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:49:55.000Z" + }, + "value": { + "$id": "2893", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2894", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2895", + "timestamp": { + "$id": "2896", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:00.000Z" + }, + "value": { + "$id": "2897", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2898", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2899", + "timestamp": { + "$id": "2900", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:05.000Z" + }, + "value": { + "$id": "2901", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2902", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2903", + "timestamp": { + "$id": "2904", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:10.000Z" + }, + "value": { + "$id": "2905", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2906", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2907", + "timestamp": { + "$id": "2908", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:15.000Z" + }, + "value": { + "$id": "2909", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2910", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2911", + "timestamp": { + "$id": "2912", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:20.000Z" + }, + "value": { + "$id": "2913", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2914", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2915", + "timestamp": { + "$id": "2916", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:25.000Z" + }, + "value": { + "$id": "2917", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2918", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2919", + "timestamp": { + "$id": "2920", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:30.000Z" + }, + "value": { + "$id": "2921", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2922", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2923", + "timestamp": { + "$id": "2924", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:35.000Z" + }, + "value": { + "$id": "2925", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2926", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2927", + "timestamp": { + "$id": "2928", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:40.000Z" + }, + "value": { + "$id": "2929", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2930", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2931", + "timestamp": { + "$id": "2932", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:45.000Z" + }, + "value": { + "$id": "2933", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2934", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2935", + "timestamp": { + "$id": "2936", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:50.000Z" + }, + "value": { + "$id": "2937", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2938", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2939", + "timestamp": { + "$id": "2940", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:50:55.000Z" + }, + "value": { + "$id": "2941", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2942", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2943", + "timestamp": { + "$id": "2944", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:00.000Z" + }, + "value": { + "$id": "2945", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2946", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2947", + "timestamp": { + "$id": "2948", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:05.000Z" + }, + "value": { + "$id": "2949", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2950", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2951", + "timestamp": { + "$id": "2952", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:10.000Z" + }, + "value": { + "$id": "2953", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2954", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2955", + "timestamp": { + "$id": "2956", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:15.000Z" + }, + "value": { + "$id": "2957", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2958", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2959", + "timestamp": { + "$id": "2960", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:20.000Z" + }, + "value": { + "$id": "2961", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2962", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2963", + "timestamp": { + "$id": "2964", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:25.000Z" + }, + "value": { + "$id": "2965", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2966", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2967", + "timestamp": { + "$id": "2968", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:30.000Z" + }, + "value": { + "$id": "2969", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2970", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2971", + "timestamp": { + "$id": "2972", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:35.000Z" + }, + "value": { + "$id": "2973", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2974", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2975", + "timestamp": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:40.000Z" + }, + "value": { + "$id": "2977", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2978", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2979", + "timestamp": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:45.000Z" + }, + "value": { + "$id": "2981", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2982", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2983", + "timestamp": { + "$id": "2984", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:50.000Z" + }, + "value": { + "$id": "2985", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2986", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2987", + "timestamp": { + "$id": "2988", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:51:55.000Z" + }, + "value": { + "$id": "2989", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2990", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2991", + "timestamp": { + "$id": "2992", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:00.000Z" + }, + "value": { + "$id": "2993", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2994", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2995", + "timestamp": { + "$id": "2996", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:05.000Z" + }, + "value": { + "$id": "2997", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "2998", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2999", + "timestamp": { + "$id": "3000", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:10.000Z" + }, + "value": { + "$id": "3001", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3002", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3003", + "timestamp": { + "$id": "3004", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:15.000Z" + }, + "value": { + "$id": "3005", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3006", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3007", + "timestamp": { + "$id": "3008", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:20.000Z" + }, + "value": { + "$id": "3009", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3010", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3011", + "timestamp": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:25.000Z" + }, + "value": { + "$id": "3013", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3014", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3015", + "timestamp": { + "$id": "3016", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:30.000Z" + }, + "value": { + "$id": "3017", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3018", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3019", + "timestamp": { + "$id": "3020", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:35.000Z" + }, + "value": { + "$id": "3021", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3022", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3023", + "timestamp": { + "$id": "3024", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:40.000Z" + }, + "value": { + "$id": "3025", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3026", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3027", + "timestamp": { + "$id": "3028", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:45.000Z" + }, + "value": { + "$id": "3029", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3030", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3031", + "timestamp": { + "$id": "3032", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:50.000Z" + }, + "value": { + "$id": "3033", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3034", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3035", + "timestamp": { + "$id": "3036", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:52:55.000Z" + }, + "value": { + "$id": "3037", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3038", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3039", + "timestamp": { + "$id": "3040", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:53:00.000Z" + }, + "value": { + "$id": "3041", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3042", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3043", + "timestamp": { + "$id": "3044", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:53:05.000Z" + }, + "value": { + "$id": "3045", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3046", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3047", + "timestamp": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:53:10.000Z" + }, + "value": { + "$id": "3049", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3050", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3051", + "timestamp": { + "$id": "3052", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:53:15.000Z" + }, + "value": { + "$id": "3053", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3054", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3055", + "timestamp": { + "$id": "3056", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:53:20.000Z" + }, + "value": { + "$id": "3057", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 50 + } + } + }, + { + "$id": "3058", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3059", + "timestamp": { + "$id": "3060", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2022-10-29T08:53:25.000Z" + }, + "value": { + "$id": "3061", + "kind": "number", + "type": { + "$ref": "715" + }, + "value": 49 + } + } + } + ] + }, + "dimensionValues": { + "$id": "3062", + "kind": "array", + "type": { + "$ref": "717" + }, + "value": [ + { + "$id": "3063", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "3064", + "name": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "720" + }, + "value": "SamplerName" + }, + "value": { + "$id": "3066", + "kind": "string", + "type": { + "$ref": "722" + }, + "value": "HighLoadTest" + } + } + } + ] + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "3067", + "Name": "listTestRuns", + "ResourceName": "TestRun", + "Summary": "Get all test runs for the given filters.", + "Description": "Get all test runs for the given filters.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3068", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3070", + "Type": { + "$id": "3071", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3072", + "Name": "orderby", + "NameInRequest": "orderby", + "Description": "Sort on the supported fields in (field asc/desc) format. eg: executedDateTime\nasc. Supported fields - executedDateTime", + "Type": { + "$id": "3073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3074", + "Name": "search", + "NameInRequest": "search", + "Description": "Prefix based, case sensitive search on searchable fields - description,\nexecutedUser. For example, to search for a test run, with description 500 VUs,\nthe search parameter can be 500.", + "Type": { + "$id": "3075", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3076", + "Name": "testId", + "NameInRequest": "testId", + "Description": "Unique name of an existing load test.", + "Type": { + "$id": "3077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3078", + "Name": "executionFrom", + "NameInRequest": "executionFrom", + "Description": "Start DateTime(RFC 3339 literal format) of test-run execution time filter range.", + "Type": { + "$id": "3079", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3081", + "Name": "executionTo", + "NameInRequest": "executionTo", + "Description": "End DateTime(RFC 3339 literal format) of test-run execution time filter range.", + "Type": { + "$id": "3082", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3083", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3084", + "Name": "status", + "NameInRequest": "status", + "Description": "Comma separated list of test run status.", + "Type": { + "$id": "3085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3086", + "Name": "maxpagesize", + "NameInRequest": "maxpagesize", + "Description": "Number of results in response.", + "Type": { + "$id": "3087", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3088", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3089", + "kind": "constant", + "valueType": { + "$id": "3090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3091", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "826" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs", + "BufferResponse": true, + "Paging": { + "$id": "3092", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.listTestRuns", + "Decorators": [], + "Examples": [ + { + "$id": "3093", + "kind": "http", + "name": "List test runs.", + "description": "List test runs.", + "filePath": "2024-12-01-preview/ListTestRuns.json", + "parameters": [ + { + "$id": "3094", + "parameter": { + "$ref": "3076" + }, + "value": { + "$id": "3095", + "kind": "string", + "type": { + "$ref": "3077" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "3096", + "parameter": { + "$ref": "3074" + }, + "value": { + "$id": "3097", + "kind": "string", + "type": { + "$ref": "3075" + }, + "value": "Performance_LoadTest_Run1" + } + }, + { + "$id": "3098", + "parameter": { + "$ref": "3078" + }, + "value": { + "$id": "3099", + "kind": "string", + "type": { + "$ref": "3079" + }, + "value": "2021-12-05T16:43:48.805Z" + } + }, + { + "$id": "3100", + "parameter": { + "$ref": "3081" + }, + "value": { + "$id": "3101", + "kind": "string", + "type": { + "$ref": "3082" + }, + "value": "2021-12-05T16:43:48.805Z" + } + }, + { + "$id": "3102", + "parameter": { + "$ref": "3084" + }, + "value": { + "$id": "3103", + "kind": "string", + "type": { + "$ref": "3085" + }, + "value": "DONE,EXECUTING" + } + }, + { + "$id": "3104", + "parameter": { + "$ref": "3068" + }, + "value": { + "$id": "3105", + "kind": "string", + "type": { + "$ref": "3069" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3106", + "response": { + "$ref": "3091" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3107", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3108", + "value": { + "$id": "3109", + "kind": "array", + "type": { + "$ref": "828" + }, + "value": [ + { + "$id": "3110", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3111", + "testRunId": { + "$id": "3112", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3113", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "Performance_LoadTest_Run1" + }, + "testId": { + "$id": "3114", + "kind": "string", + "type": { + "$ref": "582" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3115", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "sample description" + }, + "status": { + "$id": "3116", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "startDateTime": { + "$id": "3117", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "endDateTime": { + "$id": "3118", + "kind": "string", + "type": { + "$ref": "590" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "loadTestConfiguration": { + "$id": "3119", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "3120", + "engineInstances": { + "$id": "3121", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "3122", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "testResult": { + "$id": "3123", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "PASSED" + }, + "passFailCriteria": { + "$id": "3124", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "3125", + "passFailMetrics": { + "$id": "3126", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "3127", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "3128", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "3129", + "clientMetric": { + "$id": "3130", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "3131", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "3132", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "3133", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 10 + }, + "action": { + "$id": "3134", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "3135", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 10 + }, + "result": { + "$id": "3136", + "kind": "string", + "type": { + "$ref": "52" + }, + "value": "passed" + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "3137", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "3138", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "3139", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "3140", + "resourceId": { + "$id": "3141", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "3142", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "3143", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "3144", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "3146", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "3147", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "autoStopCriteria": { + "$id": "3148", + "kind": "model", + "type": { + "$ref": "302" + }, + "value": { + "$id": "3149", + "autoStopDisabled": { + "$id": "3150", + "kind": "boolean", + "type": { + "$ref": "304" + }, + "value": true + }, + "errorRate": { + "$id": "3151", + "kind": "number", + "type": { + "$ref": "306" + }, + "value": 70 + }, + "errorRateTimeWindowInSeconds": { + "$id": "3152", + "kind": "number", + "type": { + "$ref": "308" + }, + "value": 60 + } + } + }, + "testArtifacts": { + "$id": "3153", + "kind": "model", + "type": { + "$ref": "542" + }, + "value": { + "$id": "3154", + "inputArtifacts": { + "$id": "3155", + "kind": "model", + "type": { + "$ref": "544" + }, + "value": { + "$id": "3156", + "configFileInfo": { + "$id": "3157", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3158", + "url": { + "$id": "3159", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3160", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "3163", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3164", + "url": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3166", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "3167", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "3169", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "3170", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3171", + "url": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "3174", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "3175", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "3176", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3177", + "url": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3179", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "3180", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "3181", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "3182", + "kind": "array", + "type": { + "$ref": "563" + }, + "value": [] + } + } + }, + "outputArtifacts": { + "$id": "3183", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3184", + "resultFileInfo": { + "$id": "3185", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3186", + "url": { + "$id": "3187", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3188", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "3189", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "3190", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "logsFileInfo": { + "$id": "3192", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3193", + "url": { + "$id": "3194", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3195", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "worker.log" + }, + "fileType": { + "$id": "3196", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "3197", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2022-05-16T09:14:46.0411793+00:00" + } + } + } + } + } + } + }, + "executedDateTime": { + "$id": "3198", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "virtualUsers": { + "$id": "3199", + "kind": "number", + "type": { + "$ref": "578" + }, + "value": 4 + }, + "virtualUserHours": { + "$id": "3200", + "kind": "number", + "type": { + "$ref": "600" + }, + "value": 20.5 + }, + "testRunStatistics": { + "$id": "3201", + "kind": "dict", + "type": { + "$ref": "494" + }, + "value": { + "$id": "3202", + "Total": { + "$id": "3203", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "3204", + "transaction": { + "$id": "3205", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "Total" + }, + "sampleCount": { + "$id": "3206", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 18 + }, + "errorCount": { + "$id": "3207", + "kind": "number", + "type": { + "$ref": "502" + }, + "value": 19 + }, + "errorPct": { + "$id": "3208", + "kind": "number", + "type": { + "$ref": "504" + }, + "value": 17 + }, + "meanResTime": { + "$id": "3209", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 13 + }, + "medianResTime": { + "$id": "3210", + "kind": "number", + "type": { + "$ref": "508" + }, + "value": 10 + }, + "maxResTime": { + "$id": "3211", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 16 + }, + "minResTime": { + "$id": "3212", + "kind": "number", + "type": { + "$ref": "512" + }, + "value": 18 + }, + "pct1ResTime": { + "$id": "3213", + "kind": "number", + "type": { + "$ref": "514" + }, + "value": 27 + }, + "pct2ResTime": { + "$id": "3214", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + }, + "pct3ResTime": { + "$id": "3215", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 3 + }, + "throughput": { + "$id": "3216", + "kind": "number", + "type": { + "$ref": "532" + }, + "value": 5 + }, + "receivedKBytesPerSec": { + "$id": "3217", + "kind": "number", + "type": { + "$ref": "534" + }, + "value": 13 + }, + "sentKBytesPerSec": { + "$id": "3218", + "kind": "number", + "type": { + "$ref": "536" + }, + "value": 4 + } + } + } + } + }, + "createdDateTime": { + "$id": "3219", + "kind": "string", + "type": { + "$ref": "611" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "3220", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3222", + "kind": "string", + "type": { + "$ref": "619" + }, + "value": "user@contoso.com" + }, + "portalUrl": { + "$id": "3223", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "https://portal.azure.com/dummyresource" + }, + "secrets": { + "$id": "3224", + "kind": "dict", + "type": { + "$ref": "481" + }, + "value": { + "$id": "3225", + "secret1": { + "$id": "3226", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "3227", + "value": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "3229", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "3230", + "kind": "dict", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3231", + "envvar1": { + "$id": "3232", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "sampletext" + } + } + }, + "duration": { + "$id": "3233", + "kind": "number", + "type": { + "$ref": "598" + }, + "value": 18 + }, + "subnetId": { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + } + } + } + ] + }, + "nextLink": { + "$id": "3235", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "https://nextlink.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "3236", + "Name": "stopTestRun", + "ResourceName": "TestRunOperations", + "Summary": "Stop test run by test run Id.", + "Description": "Stop test run by test run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3237", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3239", + "Type": { + "$id": "3240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3241", + "Name": "testRunId", + "NameInRequest": "testRunId", + "Description": "Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3243", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3244", + "kind": "constant", + "valueType": { + "$id": "3245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3246", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "475" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-runs/{testRunId}:stop", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestRunOperations.stop", + "Decorators": [], + "Examples": [ + { + "$id": "3247", + "kind": "http", + "name": "Stop test run by name.", + "description": "Stop test run by name.", + "filePath": "2024-12-01-preview/StopTestRun.json", + "parameters": [ + { + "$id": "3248", + "parameter": { + "$ref": "3241" + }, + "value": { + "$id": "3249", + "kind": "string", + "type": { + "$ref": "3242" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "3250", + "parameter": { + "$ref": "3237" + }, + "value": { + "$id": "3251", + "kind": "string", + "type": { + "$ref": "3238" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3252", + "response": { + "$ref": "3246" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3253", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3254", + "testRunId": { + "$id": "3255", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3256", + "kind": "string", + "type": { + "$ref": "580" + }, + "value": "Performance_LoadTest_Run1" + }, + "testId": { + "$id": "3257", + "kind": "string", + "type": { + "$ref": "582" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3258", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "sample description" + }, + "status": { + "$id": "3259", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "CANCELLING" + }, + "startDateTime": { + "$id": "3260", + "kind": "string", + "type": { + "$ref": "587" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "endDateTime": { + "$id": "3261", + "kind": "string", + "type": { + "$ref": "590" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "loadTestConfiguration": { + "$id": "3262", + "kind": "model", + "type": { + "$ref": "328" + }, + "value": { + "$id": "3263", + "engineInstances": { + "$id": "3264", + "kind": "number", + "type": { + "$ref": "330" + }, + "value": 6 + }, + "splitAllCSVs": { + "$id": "3265", + "kind": "boolean", + "type": { + "$ref": "332" + }, + "value": true + } + } + }, + "testResult": { + "$id": "3266", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "NOT_APPLICABLE" + }, + "passFailCriteria": { + "$id": "3267", + "kind": "model", + "type": { + "$ref": "264" + }, + "value": { + "$id": "3268", + "passFailMetrics": { + "$id": "3269", + "kind": "dict", + "type": { + "$ref": "266" + }, + "value": { + "$id": "3270", + "pfmetric1": { + "$id": "3271", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "3272", + "clientMetric": { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "response_time_ms" + }, + "aggregate": { + "$id": "3274", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "percentage" + }, + "condition": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": ">" + }, + "value": { + "$id": "3276", + "kind": "number", + "type": { + "$ref": "276" + }, + "value": 20 + }, + "action": { + "$id": "3277", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + }, + "actualValue": { + "$id": "3278", + "kind": "number", + "type": { + "$ref": "279" + }, + "value": 0 + } + } + } + } + }, + "passFailServerMetrics": { + "$id": "3279", + "kind": "dict", + "type": { + "$ref": "282" + }, + "value": { + "$id": "3280", + "fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": { + "$id": "3281", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "3282", + "resourceId": { + "$id": "3283", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" + }, + "metricNamespace": { + "$id": "3284", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + "metricName": { + "$id": "3285", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Percentage CPU" + }, + "aggregation": { + "$id": "3286", + "kind": "string", + "type": { + "$ref": "292" + }, + "value": "Average" + }, + "condition": { + "$id": "3287", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": ">" + }, + "value": { + "$id": "3288", + "kind": "number", + "type": { + "$ref": "296" + }, + "value": 20 + }, + "action": { + "$id": "3289", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "continue" + } + } + } + } + } + } + }, + "testArtifacts": { + "$id": "3290", + "kind": "model", + "type": { + "$ref": "542" + }, + "value": { + "$id": "3291", + "inputArtifacts": { + "$id": "3292", + "kind": "model", + "type": { + "$ref": "544" + }, + "value": { + "$id": "3293", + "configFileInfo": { + "$id": "3294", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3295", + "url": { + "$id": "3296", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.yaml?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3297", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "config.yaml" + }, + "fileType": { + "$id": "3298", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "3299", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "testScriptFileInfo": { + "$id": "3300", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3301", + "url": { + "$id": "3302", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.jmx?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3303", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "sample.jmx" + }, + "fileType": { + "$id": "3304", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "JMX_FILE" + }, + "expireDateTime": { + "$id": "3305", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "validationStatus": { + "$id": "3306", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "VALIDATION_SUCCESS" + } + } + }, + "userPropFileInfo": { + "$id": "3307", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3308", + "url": { + "$id": "3309", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.properties?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "user.properties" + }, + "fileType": { + "$id": "3311", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "USER_PROPERTIES" + }, + "expireDateTime": { + "$id": "3312", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "inputArtifactsZipFileInfo": { + "$id": "3313", + "kind": "model", + "type": { + "$ref": "546" + }, + "value": { + "$id": "3314", + "url": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "https://somestorageaccount.blob.core.windows.net/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000.zip?sv=2019-12-12&st=2021-01-26T18%3A30%3A20Z&se=2021-02-05T18%3A30%3A00Z&sr=c&sp=rl&sig=d7PZKyQsIeE6xb%2B1M4Yb56I%2FEEKoNIF65D%2Fs0IFsYcE%3D" + }, + "fileName": { + "$id": "3316", + "kind": "string", + "type": { + "$ref": "548" + }, + "value": "inputartifacts.zip" + }, + "fileType": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "ADDITIONAL_ARTIFACTS" + }, + "expireDateTime": { + "$id": "3318", + "kind": "string", + "type": { + "$ref": "553" + }, + "value": "2021-12-05T16:43:46.072Z" + } + } + }, + "additionalFileInfo": { + "$id": "3319", + "kind": "array", + "type": { + "$ref": "563" + }, + "value": [] + } + } + }, + "outputArtifacts": { + "$id": "3320", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3321" + } + } + } + }, + "executedDateTime": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2021-12-05T16:43:48.125Z" + }, + "createdDateTime": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "611" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "createdBy": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "614" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3325", + "kind": "string", + "type": { + "$ref": "616" + }, + "value": "2021-12-05T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3326", + "kind": "string", + "type": { + "$ref": "619" + }, + "value": "user@contoso.com" + }, + "portalUrl": { + "$id": "3327", + "kind": "string", + "type": { + "$ref": "596" + }, + "value": "https://portal.azure.com/dummyresource" + }, + "secrets": { + "$id": "3328", + "kind": "dict", + "type": { + "$ref": "481" + }, + "value": { + "$id": "3329", + "secret1": { + "$id": "3330", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "3331", + "value": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827" + }, + "type": { + "$id": "3333", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "AKV_SECRET_URI" + } + } + } + } + }, + "environmentVariables": { + "$id": "3334", + "kind": "dict", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3335", + "envvar1": { + "$id": "3336", + "kind": "string", + "type": { + "$ref": "487" + }, + "value": "sampletext" + } + } + }, + "subnetId": { + "$id": "3337", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "3338" + }, + "Parameters": [ + { + "$id": "3339", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3340", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client" + } + ], + "Decorators": [] + }, + { + "$id": "3341", + "Name": "LoadTestAdministrationClient", + "Operations": [ + { + "$id": "3342", + "Name": "createOrUpdateTestProfile", + "ResourceName": "TestProfile", + "Summary": "Create a new test profile or update an existing test profile.", + "Description": "Create a new test profile or update an existing test profile by providing the test profile Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3343", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3344", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3345", + "Type": { + "$id": "3346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3347", + "Name": "testProfileId", + "NameInRequest": "testProfileId", + "Description": "Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3349", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "This request has a JSON Merge Patch body.", + "Type": { + "$id": "3350", + "kind": "constant", + "valueType": { + "$id": "3351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3352", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3353", + "kind": "constant", + "valueType": { + "$id": "3354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3355", + "Name": "body", + "NameInRequest": "body", + "Description": "The resource instance.", + "Type": { + "$ref": "726" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3356", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "726" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "3357", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "726" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/test-profiles/{testProfileId}", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.TestProfileAdministrationOperations.createOrUpdateTestProfile", + "Decorators": [], + "Examples": [ + { + "$id": "3358", + "kind": "http", + "name": "Create or update a test profile", + "description": "Create or update a test profile", + "filePath": "2024-12-01-preview/CreateOrUpdateTestProfile.json", + "parameters": [ + { + "$id": "3359", + "parameter": { + "$ref": "3343" + }, + "value": { + "$id": "3360", + "kind": "string", + "type": { + "$ref": "3344" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "3361", + "parameter": { + "$ref": "3347" + }, + "value": { + "$id": "3362", + "kind": "string", + "type": { + "$ref": "3348" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "3363", + "parameter": { + "$ref": "3355" + }, + "value": { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3365", + "description": { + "$id": "3366", + "kind": "string", + "type": { + "$ref": "732" + }, + "value": "sample description" + }, + "displayName": { + "$id": "3367", + "kind": "string", + "type": { + "$ref": "730" + }, + "value": "Performance_TestProfile" + }, + "testId": { + "$id": "3368", + "kind": "string", + "type": { + "$ref": "734" + }, + "value": "12346-abcd-6789" + }, + "targetResourceId": { + "$id": "3369", + "kind": "string", + "type": { + "$ref": "736" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3370", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3371", + "kind": { + "$id": "3372", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3373", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3374", + "config1": { + "$id": "3375", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3376", + "instanceMemoryMB": { + "$id": "3377", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3378", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3379", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3380", + "instanceMemoryMB": { + "$id": "3381", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3382", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3383", + "response": { + "$ref": "3357" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3384", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3385", + "testProfileId": { + "$id": "3386", + "kind": "string", + "type": { + "$ref": "728" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3387", + "kind": "string", + "type": { + "$ref": "732" + }, + "value": "sample description" + }, + "displayName": { + "$id": "3388", + "kind": "string", + "type": { + "$ref": "730" + }, + "value": "Performance_TestProfile" + }, + "testId": { + "$id": "3389", + "kind": "string", + "type": { + "$ref": "734" + }, + "value": "12346-abcd-6789" + }, + "targetResourceId": { + "$id": "3390", + "kind": "string", + "type": { + "$ref": "736" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3391", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3392", + "kind": { + "$id": "3393", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3394", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3395", + "config1": { + "$id": "3396", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3397", + "instanceMemoryMB": { + "$id": "3398", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 512 + }, + "httpConcurrency": { + "$id": "3399", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3400", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3401", + "instanceMemoryMB": { + "$id": "3402", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3403", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3404", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3405", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3406", + "kind": "string", + "type": { + "$ref": "759" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3407", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "user@contoso.com" + } + } + } + }, + { + "$id": "3408", + "response": { + "$ref": "3356" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3409", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3410", + "testProfileId": { + "$id": "3411", + "kind": "string", + "type": { + "$ref": "728" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3412", + "kind": "string", + "type": { + "$ref": "732" + }, + "value": "sample description" + }, + "displayName": { + "$id": "3413", + "kind": "string", + "type": { + "$ref": "730" + }, + "value": "Performance_TestProfile" + }, + "testId": { + "$id": "3414", + "kind": "string", + "type": { + "$ref": "734" + }, + "value": "12346-abcd-6789" + }, + "targetResourceId": { + "$id": "3415", + "kind": "string", + "type": { + "$ref": "736" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3416", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3417", + "kind": { + "$id": "3418", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3419", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3420", + "config1": { + "$id": "3421", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3422", + "instanceMemoryMB": { + "$id": "3423", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 512 + }, + "httpConcurrency": { + "$id": "3424", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3425", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3426", + "instanceMemoryMB": { + "$id": "3427", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3428", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3429", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3430", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3431", + "kind": "string", + "type": { + "$ref": "759" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3432", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "3433", + "Name": "deleteTestProfile", + "ResourceName": "TestProfile", + "Summary": "Delete a test profile.", + "Description": "Delete a test profile by its test profile Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3434", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3436", + "Type": { + "$id": "3437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3438", + "Name": "testProfileId", + "NameInRequest": "testProfileId", + "Description": "Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3440", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3441", + "kind": "constant", + "valueType": { + "$id": "3442", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3443", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profiles/{testProfileId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileAdministrationOperations.deleteTestProfile", + "Decorators": [], + "Examples": [ + { + "$id": "3444", + "kind": "http", + "name": "Delete a test profile", + "description": "Delete a test profile", + "filePath": "2024-12-01-preview/DeleteTestProfile.json", + "parameters": [ + { + "$id": "3445", + "parameter": { + "$ref": "3434" + }, + "value": { + "$id": "3446", + "kind": "string", + "type": { + "$ref": "3435" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "3447", + "parameter": { + "$ref": "3438" + }, + "value": { + "$id": "3448", + "kind": "string", + "type": { + "$ref": "3439" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + } + ], + "responses": [ + { + "$id": "3449", + "response": { + "$ref": "3443" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3450", + "Name": "getTestProfile", + "ResourceName": "TestProfile", + "Summary": "Get load test profile details.", + "Description": "Get load test profile details by test profile Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3451", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3453", + "Type": { + "$id": "3454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3455", + "Name": "testProfileId", + "NameInRequest": "testProfileId", + "Description": "Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "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": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3458", + "kind": "constant", + "valueType": { + "$id": "3459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3460", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "726" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profiles/{testProfileId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileAdministrationOperations.getTestProfile", + "Decorators": [], + "Examples": [ + { + "$id": "3461", + "kind": "http", + "name": "Get a test profile.", + "description": "Get a test profile.", + "filePath": "2024-12-01-preview/GetTestProfile.json", + "parameters": [ + { + "$id": "3462", + "parameter": { + "$ref": "3451" + }, + "value": { + "$id": "3463", + "kind": "string", + "type": { + "$ref": "3452" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "3464", + "parameter": { + "$ref": "3455" + }, + "value": { + "$id": "3465", + "kind": "string", + "type": { + "$ref": "3456" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + } + ], + "responses": [ + { + "$id": "3466", + "response": { + "$ref": "3460" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3467", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3468", + "testProfileId": { + "$id": "3469", + "kind": "string", + "type": { + "$ref": "728" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3470", + "kind": "string", + "type": { + "$ref": "732" + }, + "value": "sample description" + }, + "displayName": { + "$id": "3471", + "kind": "string", + "type": { + "$ref": "730" + }, + "value": "Performance_TestProfile" + }, + "testId": { + "$id": "3472", + "kind": "string", + "type": { + "$ref": "734" + }, + "value": "12346-abcd-6789" + }, + "targetResourceId": { + "$id": "3473", + "kind": "string", + "type": { + "$ref": "736" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3474", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3475", + "kind": { + "$id": "3476", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3477", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3478", + "config1": { + "$id": "3479", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3480", + "instanceMemoryMB": { + "$id": "3481", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3482", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3483", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3484", + "instanceMemoryMB": { + "$id": "3485", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3486", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3487", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3488", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3489", + "kind": "string", + "type": { + "$ref": "759" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3490", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "3491", + "Name": "listTestProfiles", + "ResourceName": "TestProfile", + "Summary": "List test profiles.", + "Description": "Get all test profiles for the given filters.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3492", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3494", + "Type": { + "$id": "3495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3496", + "Name": "maxpagesize", + "NameInRequest": "maxpagesize", + "Description": "Maximum number of results to include in a single response.", + "Type": { + "$id": "3497", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3498", + "Name": "lastModifiedStartTime", + "NameInRequest": "lastModifiedStartTime", + "Description": "Start DateTime(RFC 3339 literal format) of the last updated time range to filter test profiles.", + "Type": { + "$id": "3499", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3500", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3501", + "Name": "lastModifiedEndTime", + "NameInRequest": "lastModifiedEndTime", + "Description": "End DateTime(RFC 3339 literal format) of the last updated time range to filter test profiles.", + "Type": { + "$id": "3502", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3504", + "Name": "testProfileIds", + "NameInRequest": "testProfileIds", + "Description": "Comma separated list of IDs of the test profiles to filter.", + "Type": { + "$id": "3505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3506", + "Name": "testIds", + "NameInRequest": "testIds", + "Description": "Comma separated list IDs of the tests which should be associated with the test profiles to fetch.", + "Type": { + "$id": "3507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3508", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3509", + "kind": "constant", + "valueType": { + "$id": "3510", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3511", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "832" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profiles", + "BufferResponse": true, + "Paging": { + "$id": "3512", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileAdministrationOperations.listTestProfiles", + "Decorators": [], + "Examples": [ + { + "$id": "3513", + "kind": "http", + "name": "Get all test profiles for the specified filters.", + "description": "Get all test profiles for the specified filters.", + "filePath": "2024-12-01-preview/ListTestProfiles.json", + "parameters": [ + { + "$id": "3514", + "parameter": { + "$ref": "3498" + }, + "value": { + "$id": "3515", + "kind": "string", + "type": { + "$ref": "3499" + }, + "value": "2024-05-01T16:00:46.072Z" + } + }, + { + "$id": "3516", + "parameter": { + "$ref": "3501" + }, + "value": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "3502" + }, + "value": "2024-05-01T16:50:46.072Z" + } + }, + { + "$id": "3518", + "parameter": { + "$ref": "3504" + }, + "value": { + "$id": "3519", + "kind": "string", + "type": { + "$ref": "3505" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "3520", + "parameter": { + "$ref": "3506" + }, + "value": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "3507" + }, + "value": "12346-abcd-6789" + } + }, + { + "$id": "3522", + "parameter": { + "$ref": "3492" + }, + "value": { + "$id": "3523", + "kind": "string", + "type": { + "$ref": "3493" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3524", + "response": { + "$ref": "3511" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3525", + "kind": "model", + "type": { + "$ref": "832" + }, + "value": { + "$id": "3526", + "value": { + "$id": "3527", + "kind": "array", + "type": { + "$ref": "834" + }, + "value": [ + { + "$id": "3528", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3529", + "testProfileId": { + "$id": "3530", + "kind": "string", + "type": { + "$ref": "728" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3531", + "kind": "string", + "type": { + "$ref": "732" + }, + "value": "sample description" + }, + "displayName": { + "$id": "3532", + "kind": "string", + "type": { + "$ref": "730" + }, + "value": "Performance_TestProfile" + }, + "testId": { + "$id": "3533", + "kind": "string", + "type": { + "$ref": "734" + }, + "value": "12346-abcd-6789" + }, + "targetResourceId": { + "$id": "3534", + "kind": "string", + "type": { + "$ref": "736" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3535", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3536", + "kind": { + "$id": "3537", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3538", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3539", + "config1": { + "$id": "3540", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3541", + "instanceMemoryMB": { + "$id": "3542", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3543", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3544", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3545", + "instanceMemoryMB": { + "$id": "3546", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3547", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3548", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3549", + "kind": "string", + "type": { + "$ref": "757" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3550", + "kind": "string", + "type": { + "$ref": "759" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3551", + "kind": "string", + "type": { + "$ref": "762" + }, + "value": "user@contoso.com" + } + } + } + ] + }, + "nextLink": { + "$id": "3552", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "https://00000000-0000-0000-aaaa-00aa00aa00aa.eastus.cnt-prod.loadtesting.azure.com/test-profiles?orderby=lastModifiedDateTime%20desc&continuationToken=some-value&search=Performance_TestProfile&&lastModifiedStartTime=&lastModifiedEndTime=&maxPageSize=50&api-version=2024-05-01-preview" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "3553" + }, + "Parameters": [ + { + "$id": "3554", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3555", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client" + } + ], + "Decorators": [] + }, + { + "$id": "3556", + "Name": "LoadTestRunClient", + "Operations": [ + { + "$id": "3557", + "Name": "createOrUpdateTestProfileRun", + "ResourceName": "TestProfileRun", + "Summary": "Create and start a new test profile run.", + "Description": "Create and start a new test profile run with the given test profile run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3558", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3560", + "Type": { + "$id": "3561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3562", + "Name": "testProfileRunId", + "NameInRequest": "testProfileRunId", + "Description": "Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3564", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "This request has a JSON Merge Patch body.", + "Type": { + "$id": "3565", + "kind": "constant", + "valueType": { + "$id": "3566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3567", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3568", + "kind": "constant", + "valueType": { + "$id": "3569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "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": "3570", + "Name": "body", + "NameInRequest": "body", + "Description": "The resource instance.", + "Type": { + "$ref": "763" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3571", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "763" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "3572", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "763" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "RequestBodyMediaType": "Json", + "Uri": "https://{endpoint}", + "Path": "/test-profile-runs/{testProfileRunId}", + "RequestMediaTypes": [ + "application/merge-patch+json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Customizations.TestProfileRunOperations.createOrUpdateTestProfileRun", + "Decorators": [], + "Examples": [ + { + "$id": "3573", + "kind": "http", + "name": "Create/update and start a test profile run", + "description": "Create/update and start a test profile run", + "filePath": "2024-12-01-preview/CreateOrUpdateTestProfileRun.json", + "parameters": [ + { + "$id": "3574", + "parameter": { + "$ref": "3562" + }, + "value": { + "$id": "3575", + "kind": "string", + "type": { + "$ref": "3563" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "3576", + "parameter": { + "$ref": "3558" + }, + "value": { + "$id": "3577", + "kind": "string", + "type": { + "$ref": "3559" + }, + "value": "2024-12-01-preview" + } + }, + { + "$id": "3578", + "parameter": { + "$ref": "3570" + }, + "value": { + "$id": "3579", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3580", + "displayName": { + "$id": "3581", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "testProfileId": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "description": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + } + } + } + } + ], + "responses": [ + { + "$id": "3584", + "response": { + "$ref": "3572" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3585", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3586", + "testProfileRunId": { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3588", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "description": { + "$id": "3589", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + }, + "testProfileId": { + "$id": "3590", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "status": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "ACCEPTED" + }, + "startDateTime": { + "$id": "3592", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "endDateTime": { + "$id": "3593", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "durationInSeconds": { + "$id": "3594", + "kind": "number", + "type": { + "$ref": "785" + }, + "value": 400 + }, + "targetResourceId": { + "$id": "3595", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3596", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3597", + "kind": { + "$id": "3598", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3599", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3600", + "config1": { + "$id": "3601", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3602", + "instanceMemoryMB": { + "$id": "3603", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3604", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3605", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3606", + "instanceMemoryMB": { + "$id": "3607", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3608", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "testRunDetails": { + "$id": "3609", + "kind": "dict", + "type": { + "$ref": "787" + }, + "value": { + "$id": "3610", + "testRun1": { + "$id": "3611", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3612", + "status": { + "$id": "3613", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3614", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config1" + }, + "properties": { + "$id": "3615", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3616" + } + } + } + }, + "testRun2": { + "$id": "3617", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3618", + "status": { + "$id": "3619", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3620", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config2" + }, + "properties": { + "$id": "3621", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3622" + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3623", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3624", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "810" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3626", + "kind": "string", + "type": { + "$ref": "813" + }, + "value": "user@contoso.com" + } + } + } + }, + { + "$id": "3627", + "response": { + "$ref": "3571" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3628", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3629", + "testProfileRunId": { + "$id": "3630", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "description": { + "$id": "3632", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + }, + "testProfileId": { + "$id": "3633", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "status": { + "$id": "3634", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "ACCEPTED" + }, + "startDateTime": { + "$id": "3635", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "endDateTime": { + "$id": "3636", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "durationInSeconds": { + "$id": "3637", + "kind": "number", + "type": { + "$ref": "785" + }, + "value": 400 + }, + "targetResourceId": { + "$id": "3638", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3639", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3640", + "kind": { + "$id": "3641", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3642", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3643", + "config1": { + "$id": "3644", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3645", + "instanceMemoryMB": { + "$id": "3646", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 512 + }, + "httpConcurrency": { + "$id": "3647", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3648", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3649", + "instanceMemoryMB": { + "$id": "3650", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3651", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "testRunDetails": { + "$id": "3652", + "kind": "dict", + "type": { + "$ref": "787" + }, + "value": { + "$id": "3653", + "testRun1": { + "$id": "3654", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3655", + "status": { + "$id": "3656", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3657", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config1" + }, + "properties": { + "$id": "3658", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3659" + } + } + } + }, + "testRun2": { + "$id": "3660", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3661", + "status": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3663", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config2" + }, + "properties": { + "$id": "3664", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3665" + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3666", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3667", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3668", + "kind": "string", + "type": { + "$ref": "810" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3669", + "kind": "string", + "type": { + "$ref": "813" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "3670", + "Name": "deleteTestProfileRun", + "ResourceName": "TestProfileRun", + "Summary": "Delete an existing load test profile run.", + "Description": "Delete an existing load test profile run by providing the test profile run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3671", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3673", + "Type": { + "$id": "3674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3675", + "Name": "testProfileRunId", + "NameInRequest": "testProfileRunId", + "Description": "Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3677", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3678", + "kind": "constant", + "valueType": { + "$id": "3679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3680", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profile-runs/{testProfileRunId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileRunOperations.deleteTestProfileRun", + "Decorators": [], + "Examples": [ + { + "$id": "3681", + "kind": "http", + "name": "Deletes a test profile run", + "description": "Deletes a test profile run", + "filePath": "2024-12-01-preview/DeleteTestProfileRun.json", + "parameters": [ + { + "$id": "3682", + "parameter": { + "$ref": "3675" + }, + "value": { + "$id": "3683", + "kind": "string", + "type": { + "$ref": "3676" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "3684", + "parameter": { + "$ref": "3671" + }, + "value": { + "$id": "3685", + "kind": "string", + "type": { + "$ref": "3672" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3686", + "response": { + "$ref": "3680" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3687", + "Name": "getTestProfileRun", + "ResourceName": "TestProfileRun", + "Summary": "Get test profile run details.", + "Description": "Get test profile run details by test profile run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3688", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3690", + "Type": { + "$id": "3691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3692", + "Name": "testProfileRunId", + "NameInRequest": "testProfileRunId", + "Description": "Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3694", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3695", + "kind": "constant", + "valueType": { + "$id": "3696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3697", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "763" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profile-runs/{testProfileRunId}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileRunOperations.getTestProfileRun", + "Decorators": [], + "Examples": [ + { + "$id": "3698", + "kind": "http", + "name": "Get a test profile run after the run has executed.", + "description": "Get a test profile run after the run has executed.", + "filePath": "2024-12-01-preview/GetTestProfileRun_Executed.json", + "parameters": [ + { + "$id": "3699", + "parameter": { + "$ref": "3692" + }, + "value": { + "$id": "3700", + "kind": "string", + "type": { + "$ref": "3693" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "3701", + "parameter": { + "$ref": "3688" + }, + "value": { + "$id": "3702", + "kind": "string", + "type": { + "$ref": "3689" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3703", + "response": { + "$ref": "3697" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3704", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3705", + "testProfileRunId": { + "$id": "3706", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3707", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "description": { + "$id": "3708", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + }, + "testProfileId": { + "$id": "3709", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "status": { + "$id": "3710", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "DONE" + }, + "startDateTime": { + "$id": "3711", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "endDateTime": { + "$id": "3712", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "durationInSeconds": { + "$id": "3713", + "kind": "number", + "type": { + "$ref": "785" + }, + "value": 400 + }, + "targetResourceId": { + "$id": "3714", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3715", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3716", + "kind": { + "$id": "3717", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3718", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3719", + "config1": { + "$id": "3720", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3721", + "instanceMemoryMB": { + "$id": "3722", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3723", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3724", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3725", + "instanceMemoryMB": { + "$id": "3726", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3727", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "testRunDetails": { + "$id": "3728", + "kind": "dict", + "type": { + "$ref": "787" + }, + "value": { + "$id": "3729", + "testRun1": { + "$id": "3730", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3731", + "status": { + "$id": "3732", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3733", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config1" + }, + "properties": { + "$id": "3734", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3735" + } + } + } + }, + "testRun2": { + "$id": "3736", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3737", + "status": { + "$id": "3738", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config2" + }, + "properties": { + "$id": "3740", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3741" + } + } + } + } + } + }, + "recommendations": { + "$id": "3742", + "kind": "array", + "type": { + "$ref": "798" + }, + "value": [ + { + "$id": "3743", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "3744", + "category": { + "$id": "3745", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "ThroughputOptimized" + }, + "configurations": { + "$id": "3746", + "kind": "array", + "type": { + "$ref": "802" + }, + "value": [ + { + "$id": "3747", + "kind": "string", + "type": { + "$ref": "803" + }, + "value": "config2" + } + ] + } + } + }, + { + "$id": "3748", + "kind": "model", + "type": { + "$ref": "799" + }, + "value": { + "$id": "3749", + "category": { + "$id": "3750", + "kind": "string", + "type": { + "$ref": "256" + }, + "value": "CostOptimized" + }, + "configurations": { + "$id": "3751", + "kind": "array", + "type": { + "$ref": "802" + }, + "value": [ + { + "$id": "3752", + "kind": "string", + "type": { + "$ref": "803" + }, + "value": "config1" + } + ] + } + } + } + ] + }, + "createdDateTime": { + "$id": "3753", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3754", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3755", + "kind": "string", + "type": { + "$ref": "810" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "813" + }, + "value": "user@contoso.com" + } + } + } + } + ] + }, + { + "$id": "3757", + "kind": "http", + "name": "Get a test profile run while the run is executing.", + "description": "Get a test profile run while the run is executing.", + "filePath": "2024-12-01-preview/GetTestProfileRun_Executing.json", + "parameters": [ + { + "$id": "3758", + "parameter": { + "$ref": "3692" + }, + "value": { + "$id": "3759", + "kind": "string", + "type": { + "$ref": "3693" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "3760", + "parameter": { + "$ref": "3688" + }, + "value": { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "3689" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3762", + "response": { + "$ref": "3697" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3763", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3764", + "testProfileRunId": { + "$id": "3765", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3766", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "description": { + "$id": "3767", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + }, + "testProfileId": { + "$id": "3768", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "status": { + "$id": "3769", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "EXECUTING" + }, + "startDateTime": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "targetResourceId": { + "$id": "3771", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3772", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3773", + "kind": { + "$id": "3774", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3775", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3776", + "config1": { + "$id": "3777", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3778", + "instanceMemoryMB": { + "$id": "3779", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3780", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3781", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3782", + "instanceMemoryMB": { + "$id": "3783", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3784", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3785", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3786", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3787", + "kind": "string", + "type": { + "$ref": "810" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3788", + "kind": "string", + "type": { + "$ref": "813" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + }, + { + "$id": "3789", + "Name": "listTestProfileRuns", + "ResourceName": "TestProfileRun", + "Summary": "List test profile runs.", + "Description": "Get all test profile runs for the given filters.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3790", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3792", + "Type": { + "$id": "3793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3794", + "Name": "maxpagesize", + "NameInRequest": "maxpagesize", + "Description": "Maximum number of results to include in a single response.", + "Type": { + "$id": "3795", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3796", + "Name": "minStartDateTime", + "NameInRequest": "minStartDateTime", + "Description": "Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on.", + "Type": { + "$id": "3797", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3799", + "Name": "maxStartDateTime", + "NameInRequest": "maxStartDateTime", + "Description": "Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on.", + "Type": { + "$id": "3800", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3802", + "Name": "minEndDateTime", + "NameInRequest": "minEndDateTime", + "Description": "Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.", + "Type": { + "$id": "3803", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3805", + "Name": "maxEndDateTime", + "NameInRequest": "maxEndDateTime", + "Description": "Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.", + "Type": { + "$id": "3806", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3807", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3808", + "Name": "createdDateStartTime", + "NameInRequest": "createdDateStartTime", + "Description": "Start DateTime(RFC 3339 literal format) of the created time range to filter test profile runs.", + "Type": { + "$id": "3809", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3811", + "Name": "createdDateEndTime", + "NameInRequest": "createdDateEndTime", + "Description": "End DateTime(RFC 3339 literal format) of the created time range to filter test profile runs.", + "Type": { + "$id": "3812", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "3813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3814", + "Name": "testProfileRunIds", + "NameInRequest": "testProfileRunIds", + "Description": "Comma separated list of IDs of the test profile runs to filter.", + "Type": { + "$id": "3815", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3816", + "Name": "testProfileIds", + "NameInRequest": "testProfileIds", + "Description": "Comma separated IDs of the test profiles which should be associated with the test profile runs to fetch.", + "Type": { + "$id": "3817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3818", + "Name": "statuses", + "NameInRequest": "statuses", + "Description": "Comma separated list of Statuses of the test profile runs to filter.", + "Type": { + "$id": "3819", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": false, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3820", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3821", + "kind": "constant", + "valueType": { + "$id": "3822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3823", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "838" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profile-runs", + "BufferResponse": true, + "Paging": { + "$id": "3824", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileRunOperations.listTestProfileRuns", + "Decorators": [], + "Examples": [ + { + "$id": "3825", + "kind": "http", + "name": "Get all test profile runs for the specified filters.", + "description": "Get all test profile runs for the specified filters.", + "filePath": "2024-12-01-preview/ListTestProfileRuns.json", + "parameters": [ + { + "$id": "3826", + "parameter": { + "$ref": "3796" + }, + "value": { + "$id": "3827", + "kind": "string", + "type": { + "$ref": "3797" + }, + "value": "2024-05-01T16:00:46.072Z" + } + }, + { + "$id": "3828", + "parameter": { + "$ref": "3799" + }, + "value": { + "$id": "3829", + "kind": "string", + "type": { + "$ref": "3800" + }, + "value": "2024-05-01T16:50:46.072Z" + } + }, + { + "$id": "3830", + "parameter": { + "$ref": "3802" + }, + "value": { + "$id": "3831", + "kind": "string", + "type": { + "$ref": "3803" + }, + "value": "2024-05-01T16:00:46.072Z" + } + }, + { + "$id": "3832", + "parameter": { + "$ref": "3805" + }, + "value": { + "$id": "3833", + "kind": "string", + "type": { + "$ref": "3806" + }, + "value": "2024-05-01T16:50:46.072Z" + } + }, + { + "$id": "3834", + "parameter": { + "$ref": "3816" + }, + "value": { + "$id": "3835", + "kind": "string", + "type": { + "$ref": "3817" + }, + "value": "12345678-1234-1234-1234-123456789012" + } + }, + { + "$id": "3836", + "parameter": { + "$ref": "3818" + }, + "value": { + "$id": "3837", + "kind": "string", + "type": { + "$ref": "3819" + }, + "value": "ACCEPTED" + } + }, + { + "$id": "3838", + "parameter": { + "$ref": "3790" + }, + "value": { + "$id": "3839", + "kind": "string", + "type": { + "$ref": "3791" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3840", + "response": { + "$ref": "3823" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3841", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3842", + "value": { + "$id": "3843", + "kind": "array", + "type": { + "$ref": "840" + }, + "value": [ + { + "$id": "3844", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3845", + "testProfileRunId": { + "$id": "3846", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3847", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "description": { + "$id": "3848", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + }, + "testProfileId": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "status": { + "$id": "3850", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "ACCEPTED" + }, + "startDateTime": { + "$id": "3851", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "endDateTime": { + "$id": "3852", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "durationInSeconds": { + "$id": "3853", + "kind": "number", + "type": { + "$ref": "785" + }, + "value": 400 + }, + "targetResourceId": { + "$id": "3854", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3855", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3856", + "kind": { + "$id": "3857", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3858", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3859", + "config1": { + "$id": "3860", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3861", + "instanceMemoryMB": { + "$id": "3862", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3863", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3864", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3865", + "instanceMemoryMB": { + "$id": "3866", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3867", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "testRunDetails": { + "$id": "3868", + "kind": "dict", + "type": { + "$ref": "787" + }, + "value": { + "$id": "3869", + "testRun1": { + "$id": "3870", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3871", + "status": { + "$id": "3872", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3873", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config1" + }, + "properties": { + "$id": "3874", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3875" + } + } + } + }, + "testRun2": { + "$id": "3876", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3877", + "status": { + "$id": "3878", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3879", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config2" + }, + "properties": { + "$id": "3880", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3881" + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3882", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3883", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3884", + "kind": "string", + "type": { + "$ref": "810" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3885", + "kind": "string", + "type": { + "$ref": "813" + }, + "value": "user@contoso.com" + } + } + } + ] + }, + "nextLink": { + "$id": "3886", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "https://00000000-0000-0000-aaaa-00aa00aa00aa.eastus.cnt-prod.loadtesting.azure.com/test-profile-runs?orderby=startDateTime%20desc&continuationToken=some-value&search=Performance_TestProfile&&executionFrom=&executionTo=&maxPageSize=50&api-version=2024-05-01-preview" + } + } + } + } + ] + } + ] + }, + { + "$id": "3887", + "Name": "stopTestProfileRun", + "ResourceName": "TestProfileRunOperations", + "Summary": "Stop test profile run.", + "Description": "Stop test profile run for the given test profile run Id.", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3888", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "The API version to use for this operation.", + "Type": { + "$id": "3889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3890", + "Type": { + "$id": "3891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-12-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3892", + "Name": "testProfileRunId", + "NameInRequest": "testProfileRunId", + "Description": "Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.", + "Type": { + "$id": "3893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3894", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3895", + "kind": "constant", + "valueType": { + "$id": "3896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3897", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "763" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "https://{endpoint}", + "Path": "/test-profile-runs/{testProfileRunId}:stop", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Customizations.TestProfileRunOperations.stop", + "Decorators": [], + "Examples": [ + { + "$id": "3898", + "kind": "http", + "name": "Stop a test profile run", + "description": "Stop a test profile run", + "filePath": "2024-12-01-preview/StopTestProfileRun.json", + "parameters": [ + { + "$id": "3899", + "parameter": { + "$ref": "3892" + }, + "value": { + "$id": "3900", + "kind": "string", + "type": { + "$ref": "3893" + }, + "value": "12316678-1234-1234-1234-122451189012" + } + }, + { + "$id": "3901", + "parameter": { + "$ref": "3888" + }, + "value": { + "$id": "3902", + "kind": "string", + "type": { + "$ref": "3889" + }, + "value": "2024-12-01-preview" + } + } + ], + "responses": [ + { + "$id": "3903", + "response": { + "$ref": "3897" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3904", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "3905", + "testProfileRunId": { + "$id": "3906", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "12316678-1234-1234-1234-122451189012" + }, + "displayName": { + "$id": "3907", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "Performance_TestProfile_Run1" + }, + "description": { + "$id": "3908", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "sample description" + }, + "testProfileId": { + "$id": "3909", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "12345678-1234-1234-1234-123456789012" + }, + "status": { + "$id": "3910", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "CANCELLING" + }, + "startDateTime": { + "$id": "3911", + "kind": "string", + "type": { + "$ref": "779" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "endDateTime": { + "$id": "3912", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "durationInSeconds": { + "$id": "3913", + "kind": "number", + "type": { + "$ref": "785" + }, + "value": 400 + }, + "targetResourceId": { + "$id": "3914", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Web/sites/myfunctionapp" + }, + "targetResourceConfigurations": { + "$id": "3915", + "kind": "model", + "type": { + "$ref": "741" + }, + "value": { + "$id": "3916", + "kind": { + "$id": "3917", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "FunctionsFlexConsumption" + }, + "configurations": { + "$id": "3918", + "kind": "dict", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3919", + "config1": { + "$id": "3920", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3921", + "instanceMemoryMB": { + "$id": "3922", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 2048 + }, + "httpConcurrency": { + "$id": "3923", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + }, + "config2": { + "$id": "3924", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "3925", + "instanceMemoryMB": { + "$id": "3926", + "kind": "number", + "type": { + "$ref": "750" + }, + "value": 4096 + }, + "httpConcurrency": { + "$id": "3927", + "kind": "number", + "type": { + "$ref": "752" + }, + "value": 16 + } + } + } + } + } + } + }, + "testRunDetails": { + "$id": "3928", + "kind": "dict", + "type": { + "$ref": "787" + }, + "value": { + "$id": "3929", + "testRun1": { + "$id": "3930", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3931", + "status": { + "$id": "3932", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3933", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config1" + }, + "properties": { + "$id": "3934", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3935" + } + } + } + }, + "testRun2": { + "$id": "3936", + "kind": "model", + "type": { + "$ref": "789" + }, + "value": { + "$id": "3937", + "status": { + "$id": "3938", + "kind": "string", + "type": { + "$ref": "132" + }, + "value": "DONE" + }, + "configurationId": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "config2" + }, + "properties": { + "$id": "3940", + "kind": "dict", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3941" + } + } + } + } + } + }, + "createdDateTime": { + "$id": "3942", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "createdBy": { + "$id": "3943", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "user@contoso.com" + }, + "lastModifiedDateTime": { + "$id": "3944", + "kind": "string", + "type": { + "$ref": "810" + }, + "value": "2024-05-01T16:43:46.072Z" + }, + "lastModifiedBy": { + "$id": "3945", + "kind": "string", + "type": { + "$ref": "813" + }, + "value": "user@contoso.com" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "3946" + }, + "Parameters": [ + { + "$id": "3947", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Type": { + "$id": "3948", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client" + } + ], + "Decorators": [] + } + ], + "Auth": { + "$id": "3949", + "OAuth2": { + "$id": "3950", + "Scopes": [ + "https://cnt-prod.loadtesting.azure.com/.default" + ] + } + } +} diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md index 186369cb1511..1f4fb5a48f28 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/src/autorest.md @@ -6,7 +6,7 @@ Run `dotnet build /t:GenerateCode` to generate code. > see https://aka.ms/autorest ``` yaml -input-file: https://github.com/Azure/azure-rest-api-specs/blob/3e27c70e7c02c07b458bc0e94716c3d82d3fdd19/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json +input-file: https://github.com/Azure/azure-rest-api-specs/blob/ce46dc3e04b0bc3a7b04d9c715c1107186978a5c/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json namespace: Azure.Developer.LoadTesting security: AADToken security-scopes: https://cnt-prod.loadtesting.azure.com/.default diff --git a/sdk/loadtestservice/ci.mgmt.yml b/sdk/loadtestservice/ci.mgmt.yml index 4e3d99d42979..dfc32939e497 100644 --- a/sdk/loadtestservice/ci.mgmt.yml +++ b/sdk/loadtestservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/loadtestservice/ci.mgmt.yml - sdk/loadtestservice/Azure.ResourceManager.LoadTesting/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/loadtestservice/ci.mgmt.yml + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/logic/ci.mgmt.yml b/sdk/logic/ci.mgmt.yml index b89b224082ee..5bed51facd34 100644 --- a/sdk/logic/ci.mgmt.yml +++ b/sdk/logic/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/logic/ci.mgmt.yml - sdk/logic/Azure.ResourceManager.Logic/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/logic/ci.mgmt.yml + - sdk/logic/Azure.ResourceManager.Logic/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/machinelearningcompute/ci.mgmt.yml b/sdk/machinelearningcompute/ci.mgmt.yml index 9ea84fdf4d15..5ea619231191 100644 --- a/sdk/machinelearningcompute/ci.mgmt.yml +++ b/sdk/machinelearningcompute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/machinelearningcompute/ci.mgmt.yml - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningcompute/ci.mgmt.yml + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/machinelearningservices/ci.mgmt.yml b/sdk/machinelearningservices/ci.mgmt.yml index 457299ab20b9..3a99ed224fc2 100644 --- a/sdk/machinelearningservices/ci.mgmt.yml +++ b/sdk/machinelearningservices/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/machinelearningservices/ci.mgmt.yml - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningservices/ci.mgmt.yml + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/maintenance/ci.mgmt.yml b/sdk/maintenance/ci.mgmt.yml index c49cc1565d6d..94c552b69f26 100644 --- a/sdk/maintenance/ci.mgmt.yml +++ b/sdk/maintenance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/maintenance/ci.mgmt.yml - sdk/maintenance/Azure.ResourceManager.Maintenance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maintenance/ci.mgmt.yml + - sdk/maintenance/Azure.ResourceManager.Maintenance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managednetwork/ci.mgmt.yml b/sdk/managednetwork/ci.mgmt.yml index 431d66d1245b..08c9f3d0ce55 100644 --- a/sdk/managednetwork/ci.mgmt.yml +++ b/sdk/managednetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managednetwork/ci.mgmt.yml - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managednetwork/ci.mgmt.yml + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managednetworkfabric/ci.mgmt.yml b/sdk/managednetworkfabric/ci.mgmt.yml index aa6b571b04e2..3212ad45bbde 100644 --- a/sdk/managednetworkfabric/ci.mgmt.yml +++ b/sdk/managednetworkfabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managednetworkfabric/ci.mgmt.yml - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managednetworkfabric/ci.mgmt.yml + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managedserviceidentity/ci.mgmt.yml b/sdk/managedserviceidentity/ci.mgmt.yml index c8f3a187f918..c9cd4b0f235a 100644 --- a/sdk/managedserviceidentity/ci.mgmt.yml +++ b/sdk/managedserviceidentity/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managedserviceidentity/ci.mgmt.yml - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managedserviceidentity/ci.mgmt.yml + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managedservices/ci.mgmt.yml b/sdk/managedservices/ci.mgmt.yml index d6c0ccd16eef..88360bb2defa 100644 --- a/sdk/managedservices/ci.mgmt.yml +++ b/sdk/managedservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managedservices/ci.mgmt.yml - sdk/managedservices/Azure.ResourceManager.ManagedServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managedservices/ci.mgmt.yml + - sdk/managedservices/Azure.ResourceManager.ManagedServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managementpartner/ci.mgmt.yml b/sdk/managementpartner/ci.mgmt.yml index 52c8e762088e..6fdd0118e1b9 100644 --- a/sdk/managementpartner/ci.mgmt.yml +++ b/sdk/managementpartner/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managementpartner/ci.mgmt.yml - sdk/managementpartner/Azure.ResourceManager.ManagementPartner/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managementpartner/ci.mgmt.yml + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/maps/ci.mgmt.yml b/sdk/maps/ci.mgmt.yml index 2f16079cab2e..7ee4f1ddad3c 100644 --- a/sdk/maps/ci.mgmt.yml +++ b/sdk/maps/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/maps/ci.mgmt.yml - sdk/maps/Azure.ResourceManager.Maps/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maps/ci.mgmt.yml + - sdk/maps/Azure.ResourceManager.Maps/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/marketplace/ci.mgmt.yml b/sdk/marketplace/ci.mgmt.yml index e6574bdb3039..42bc8a147b30 100644 --- a/sdk/marketplace/ci.mgmt.yml +++ b/sdk/marketplace/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/marketplace/ci.mgmt.yml - sdk/marketplace/Azure.ResourceManager.Marketplace/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/marketplace/ci.mgmt.yml + - sdk/marketplace/Azure.ResourceManager.Marketplace/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/marketplaceordering/ci.mgmt.yml b/sdk/marketplaceordering/ci.mgmt.yml index 2b1f8721902e..c602647fb32d 100644 --- a/sdk/marketplaceordering/ci.mgmt.yml +++ b/sdk/marketplaceordering/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/marketplaceordering/ci.mgmt.yml - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/marketplaceordering/ci.mgmt.yml + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mediaservices/ci.mgmt.yml b/sdk/mediaservices/ci.mgmt.yml index 55656f3ae48b..201ecc9d995d 100644 --- a/sdk/mediaservices/ci.mgmt.yml +++ b/sdk/mediaservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mediaservices/ci.mgmt.yml - sdk/mediaservices/Azure.ResourceManager.Media/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mediaservices/ci.mgmt.yml + - sdk/mediaservices/Azure.ResourceManager.Media/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/migrationdiscoverysap/ci.mgmt.yml b/sdk/migrationdiscoverysap/ci.mgmt.yml index f5eb354d28e7..26c079f3d6f5 100644 --- a/sdk/migrationdiscoverysap/ci.mgmt.yml +++ b/sdk/migrationdiscoverysap/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/migrationdiscoverysap/ci.mgmt.yml - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/migrationdiscoverysap/ci.mgmt.yml + - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mixedreality/ci.mgmt.yml b/sdk/mixedreality/ci.mgmt.yml index 81c0c2744232..d342a10a32e0 100644 --- a/sdk/mixedreality/ci.mgmt.yml +++ b/sdk/mixedreality/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/mixedreality/ci.mgmt.yml - sdk/mixedreality/Azure.ResourceManager.MixedReality/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mixedreality/ci.mgmt.yml + - sdk/mixedreality/Azure.ResourceManager.MixedReality/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mobilenetwork/ci.mgmt.yml b/sdk/mobilenetwork/ci.mgmt.yml index 8a68e6749ba7..325154bfbfb7 100644 --- a/sdk/mobilenetwork/ci.mgmt.yml +++ b/sdk/mobilenetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mobilenetwork/ci.mgmt.yml - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mobilenetwork/ci.mgmt.yml + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mongocluster/ci.mgmt.yml b/sdk/mongocluster/ci.mgmt.yml index d2eafe7877dd..10f6e93db8bc 100644 --- a/sdk/mongocluster/ci.mgmt.yml +++ b/sdk/mongocluster/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mongocluster/ci.mgmt.yml - sdk/mongocluster/Azure.ResourceManager.MongoCluster/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mongocluster/ci.mgmt.yml + - sdk/mongocluster/Azure.ResourceManager.MongoCluster/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/monitor/ci.mgmt.yml b/sdk/monitor/ci.mgmt.yml index 8beeded4e3b9..5933fd35d9e5 100644 --- a/sdk/monitor/ci.mgmt.yml +++ b/sdk/monitor/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/monitor/ci.mgmt.yml - sdk/monitor/Azure.ResourceManager.Monitor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/monitor/ci.mgmt.yml + - sdk/monitor/Azure.ResourceManager.Monitor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mysql/ci.mgmt.yml b/sdk/mysql/ci.mgmt.yml index e1521b4ed568..2ba5627ae3fc 100644 --- a/sdk/mysql/ci.mgmt.yml +++ b/sdk/mysql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mysql/ci.mgmt.yml - sdk/mysql/Azure.ResourceManager.MySql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mysql/ci.mgmt.yml + - sdk/mysql/Azure.ResourceManager.MySql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/neonpostgres/ci.mgmt.yml b/sdk/neonpostgres/ci.mgmt.yml index 72d449fc7a16..00f734ba7230 100644 --- a/sdk/neonpostgres/ci.mgmt.yml +++ b/sdk/neonpostgres/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/neonpostgres/ci.mgmt.yml - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/neonpostgres/ci.mgmt.yml + - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/netapp/ci.mgmt.yml b/sdk/netapp/ci.mgmt.yml index 05a683e910f5..5d0a3e741513 100644 --- a/sdk/netapp/ci.mgmt.yml +++ b/sdk/netapp/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/netapp/ci.mgmt.yml - sdk/netapp/Azure.ResourceManager.NetApp/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/netapp/ci.mgmt.yml + - sdk/netapp/Azure.ResourceManager.NetApp/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/network/ci.mgmt.yml b/sdk/network/ci.mgmt.yml index edf77de02a49..f69378e6c236 100644 --- a/sdk/network/ci.mgmt.yml +++ b/sdk/network/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/network/ci.mgmt.yml - sdk/network/Azure.ResourceManager.Network/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/network/ci.mgmt.yml + - sdk/network/Azure.ResourceManager.Network/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkanalytics/ci.mgmt.yml b/sdk/networkanalytics/ci.mgmt.yml index 9ece072ce867..52934a1bad24 100644 --- a/sdk/networkanalytics/ci.mgmt.yml +++ b/sdk/networkanalytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkanalytics/ci.mgmt.yml - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.mgmt.yml + - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkcloud/ci.mgmt.yml b/sdk/networkcloud/ci.mgmt.yml index f6c281af22a9..940f908b8c75 100644 --- a/sdk/networkcloud/ci.mgmt.yml +++ b/sdk/networkcloud/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkcloud/ci.mgmt.yml - sdk/networkcloud/Azure.ResourceManager.NetworkCloud/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkcloud/ci.mgmt.yml + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkfunction/ci.mgmt.yml b/sdk/networkfunction/ci.mgmt.yml index a3c743ef532a..b05cf6e5e1cc 100644 --- a/sdk/networkfunction/ci.mgmt.yml +++ b/sdk/networkfunction/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkfunction/ci.mgmt.yml - sdk/networkfunction/Azure.ResourceManager.NetworkFunction/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkfunction/ci.mgmt.yml + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/newrelicobservability/ci.mgmt.yml b/sdk/newrelicobservability/ci.mgmt.yml index d01ef74cd749..599cfd845f2c 100644 --- a/sdk/newrelicobservability/ci.mgmt.yml +++ b/sdk/newrelicobservability/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/newrelicobservability/ci.mgmt.yml - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/newrelicobservability/ci.mgmt.yml + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/nginx/ci.mgmt.yml b/sdk/nginx/ci.mgmt.yml index f701b26a561a..39e047ce0015 100644 --- a/sdk/nginx/ci.mgmt.yml +++ b/sdk/nginx/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/nginx/ci.mgmt.yml - sdk/nginx/Azure.ResourceManager.Nginx/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/nginx/ci.mgmt.yml + - sdk/nginx/Azure.ResourceManager.Nginx/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/notificationhubs/ci.mgmt.yml b/sdk/notificationhubs/ci.mgmt.yml index ba5a26631dd4..8d9f15f7758b 100644 --- a/sdk/notificationhubs/ci.mgmt.yml +++ b/sdk/notificationhubs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/notificationhubs/ci.mgmt.yml - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/notificationhubs/ci.mgmt.yml + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/openenergyplatform/ci.mgmt.yml b/sdk/openenergyplatform/ci.mgmt.yml index 1ab74128b4db..f2394b80f6b9 100644 --- a/sdk/openenergyplatform/ci.mgmt.yml +++ b/sdk/openenergyplatform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/openenergyplatform/ci.mgmt.yml - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/openenergyplatform/ci.mgmt.yml + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/operationalinsights/ci.mgmt.yml b/sdk/operationalinsights/ci.mgmt.yml index d4c3b61dac40..9e588305c901 100644 --- a/sdk/operationalinsights/ci.mgmt.yml +++ b/sdk/operationalinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/operationalinsights/ci.mgmt.yml - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/operationalinsights/ci.mgmt.yml + - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/oracle/ci.mgmt.yml b/sdk/oracle/ci.mgmt.yml index ccbd7c096ecf..760950dbd58a 100644 --- a/sdk/oracle/ci.mgmt.yml +++ b/sdk/oracle/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/oracle/ci.mgmt.yml - sdk/oracle/Azure.ResourceManager.OracleDatabase/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/oracle/ci.mgmt.yml + - sdk/oracle/Azure.ResourceManager.OracleDatabase/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/orbital/ci.mgmt.yml b/sdk/orbital/ci.mgmt.yml index 701576d2fa62..2b2102df1da3 100644 --- a/sdk/orbital/ci.mgmt.yml +++ b/sdk/orbital/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/orbital/ci.mgmt.yml - sdk/orbital/Azure.ResourceManager.Orbital/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/orbital/ci.mgmt.yml + - sdk/orbital/Azure.ResourceManager.Orbital/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/paloaltonetworks.ngfw/ci.mgmt.yml b/sdk/paloaltonetworks.ngfw/ci.mgmt.yml index 77dca48de9ef..6348d3109683 100644 --- a/sdk/paloaltonetworks.ngfw/ci.mgmt.yml +++ b/sdk/paloaltonetworks.ngfw/ci.mgmt.yml @@ -1,4 +1,5 @@ trigger: none + pr: branches: include: @@ -11,6 +12,18 @@ pr: - sdk/paloaltonetworks.ngfw/ci.mgmt.yml - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/paloaltonetworks.ngfw/ci.mgmt.yml + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/peering/ci.mgmt.yml b/sdk/peering/ci.mgmt.yml index 4d3d67e73949..cfef409531ee 100644 --- a/sdk/peering/ci.mgmt.yml +++ b/sdk/peering/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/peering/ci.mgmt.yml - sdk/peering/Azure.ResourceManager.Peering/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/peering/ci.mgmt.yml + - sdk/peering/Azure.ResourceManager.Peering/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/playwrighttesting/ci.mgmt.yml b/sdk/playwrighttesting/ci.mgmt.yml index 79addf69162c..b6422b373563 100644 --- a/sdk/playwrighttesting/ci.mgmt.yml +++ b/sdk/playwrighttesting/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/playwrighttesting/ci.mgmt.yml - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/playwrighttesting/ci.mgmt.yml + - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/policyinsights/ci.mgmt.yml b/sdk/policyinsights/ci.mgmt.yml index 56fa5c3ead85..c0fa9e7dd917 100644 --- a/sdk/policyinsights/ci.mgmt.yml +++ b/sdk/policyinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/policyinsights/ci.mgmt.yml - sdk/policyinsights/Azure.ResourceManager.PolicyInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/policyinsights/ci.mgmt.yml + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/postgresql/ci.mgmt.yml b/sdk/postgresql/ci.mgmt.yml index 77dbaed301ba..08dff06cd11f 100644 --- a/sdk/postgresql/ci.mgmt.yml +++ b/sdk/postgresql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/postgresql/ci.mgmt.yml - sdk/postgresql/Azure.ResourceManager.PostgreSql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/postgresql/ci.mgmt.yml + - sdk/postgresql/Azure.ResourceManager.PostgreSql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/powerbidedicated/ci.mgmt.yml b/sdk/powerbidedicated/ci.mgmt.yml index 414f2b8ef0a9..951d3e8d0434 100644 --- a/sdk/powerbidedicated/ci.mgmt.yml +++ b/sdk/powerbidedicated/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/powerbidedicated/ci.mgmt.yml - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/powerbidedicated/ci.mgmt.yml + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/privatedns/ci.mgmt.yml b/sdk/privatedns/ci.mgmt.yml index 86401f2f9675..31c567bfe408 100644 --- a/sdk/privatedns/ci.mgmt.yml +++ b/sdk/privatedns/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/privatedns/ci.mgmt.yml - sdk/privatedns/Azure.ResourceManager.PrivateDns/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/privatedns/ci.mgmt.yml + - sdk/privatedns/Azure.ResourceManager.PrivateDns/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/providerhub/ci.mgmt.yml b/sdk/providerhub/ci.mgmt.yml index 2c7f6ca61d3f..3de6a7f30b80 100644 --- a/sdk/providerhub/ci.mgmt.yml +++ b/sdk/providerhub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/providerhub/ci.mgmt.yml - sdk/providerhub/Azure.ResourceManager.ProviderHub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/providerhub/ci.mgmt.yml + - sdk/providerhub/Azure.ResourceManager.ProviderHub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/purview/ci.mgmt.yml b/sdk/purview/ci.mgmt.yml index 226718ca583c..d5961aa8833a 100644 --- a/sdk/purview/ci.mgmt.yml +++ b/sdk/purview/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/purview/ci.mgmt.yml - sdk/purview/Azure.ResourceManager.Purview/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/purview/ci.mgmt.yml + - sdk/purview/Azure.ResourceManager.Purview/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/quantum/ci.mgmt.yml b/sdk/quantum/ci.mgmt.yml index 8562320fa7c7..6ee02d7799bd 100644 --- a/sdk/quantum/ci.mgmt.yml +++ b/sdk/quantum/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/quantum/ci.mgmt.yml - sdk/quantum/Azure.ResourceManager.Quantum/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/quantum/ci.mgmt.yml + - sdk/quantum/Azure.ResourceManager.Quantum/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/qumulo/ci.mgmt.yml b/sdk/qumulo/ci.mgmt.yml index e89c4bea0e70..fe6e1fa253d3 100644 --- a/sdk/qumulo/ci.mgmt.yml +++ b/sdk/qumulo/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/qumulo/ci.mgmt.yml - sdk/qumulo/Azure.ResourceManager.Qumulo/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/qumulo/ci.mgmt.yml + - sdk/qumulo/Azure.ResourceManager.Qumulo/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/quota/ci.mgmt.yml b/sdk/quota/ci.mgmt.yml index f1f545ad13f1..9409730d342e 100644 --- a/sdk/quota/ci.mgmt.yml +++ b/sdk/quota/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/quota/ci.mgmt.yml - sdk/quota/Azure.ResourceManager.Quota/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/quota/ci.mgmt.yml + - sdk/quota/Azure.ResourceManager.Quota/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-backup/ci.mgmt.yml b/sdk/recoveryservices-backup/ci.mgmt.yml index 5edfd823e3c0..402121c0f72c 100644 --- a/sdk/recoveryservices-backup/ci.mgmt.yml +++ b/sdk/recoveryservices-backup/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-backup/ci.mgmt.yml - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-backup/ci.mgmt.yml + - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-datareplication/ci.mgmt.yml b/sdk/recoveryservices-datareplication/ci.mgmt.yml index 2e3966d67a88..143f2e0317c3 100644 --- a/sdk/recoveryservices-datareplication/ci.mgmt.yml +++ b/sdk/recoveryservices-datareplication/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-datareplication/ci.mgmt.yml - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-datareplication/ci.mgmt.yml + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-siterecovery/ci.mgmt.yml b/sdk/recoveryservices-siterecovery/ci.mgmt.yml index bded800f3ee2..3a8a3179d5a5 100644 --- a/sdk/recoveryservices-siterecovery/ci.mgmt.yml +++ b/sdk/recoveryservices-siterecovery/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-siterecovery/ci.mgmt.yml - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-siterecovery/ci.mgmt.yml + - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices/ci.mgmt.yml b/sdk/recoveryservices/ci.mgmt.yml index 0e7e6985f21c..d4a5e482dfa7 100644 --- a/sdk/recoveryservices/ci.mgmt.yml +++ b/sdk/recoveryservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices/ci.mgmt.yml - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices/ci.mgmt.yml + - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/redis/ci.mgmt.yml b/sdk/redis/ci.mgmt.yml index 9e6845322580..dfc71e356b87 100644 --- a/sdk/redis/ci.mgmt.yml +++ b/sdk/redis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/redis/ci.mgmt.yml - sdk/redis/Azure.ResourceManager.Redis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/redis/ci.mgmt.yml + - sdk/redis/Azure.ResourceManager.Redis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/redisenterprise/ci.mgmt.yml b/sdk/redisenterprise/ci.mgmt.yml index 93641cfe3983..294ec0377bdf 100644 --- a/sdk/redisenterprise/ci.mgmt.yml +++ b/sdk/redisenterprise/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/redisenterprise/ci.mgmt.yml - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/redisenterprise/ci.mgmt.yml + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/relay/ci.mgmt.yml b/sdk/relay/ci.mgmt.yml index b69a1efbd0f9..fc5a3764ebb5 100644 --- a/sdk/relay/ci.mgmt.yml +++ b/sdk/relay/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/relay/ci.mgmt.yml - sdk/relay/Azure.ResourceManager.Relay/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/relay/ci.mgmt.yml + - sdk/relay/Azure.ResourceManager.Relay/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/reservations/ci.mgmt.yml b/sdk/reservations/ci.mgmt.yml index c46c8c69cd2e..8effbcdd4424 100644 --- a/sdk/reservations/ci.mgmt.yml +++ b/sdk/reservations/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/reservations/ci.mgmt.yml - sdk/reservations/Azure.ResourceManager.Reservations/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/reservations/ci.mgmt.yml + - sdk/reservations/Azure.ResourceManager.Reservations/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourceconnector/ci.mgmt.yml b/sdk/resourceconnector/ci.mgmt.yml index 81269b9113c7..149f1805dab4 100644 --- a/sdk/resourceconnector/ci.mgmt.yml +++ b/sdk/resourceconnector/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourceconnector/ci.mgmt.yml - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourceconnector/ci.mgmt.yml + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcegraph/ci.mgmt.yml b/sdk/resourcegraph/ci.mgmt.yml index 5abe050f7709..27656bcd16c2 100644 --- a/sdk/resourcegraph/ci.mgmt.yml +++ b/sdk/resourcegraph/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcegraph/ci.mgmt.yml - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcegraph/ci.mgmt.yml + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcehealth/ci.mgmt.yml b/sdk/resourcehealth/ci.mgmt.yml index fb0a27171a69..bf3868346c7b 100644 --- a/sdk/resourcehealth/ci.mgmt.yml +++ b/sdk/resourcehealth/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcehealth/ci.mgmt.yml - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcehealth/ci.mgmt.yml + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 960151044171..a95c685b87a3 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -203,6 +203,7 @@ trigger: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances pr: branches: @@ -408,6 +409,7 @@ pr: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml diff --git a/sdk/resourcemover/ci.mgmt.yml b/sdk/resourcemover/ci.mgmt.yml index 519b8a431926..bbb814c6a4f0 100644 --- a/sdk/resourcemover/ci.mgmt.yml +++ b/sdk/resourcemover/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcemover/ci.mgmt.yml - sdk/resourcemover/Azure.ResourceManager.ResourceMover/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemover/ci.mgmt.yml + - sdk/resourcemover/Azure.ResourceManager.ResourceMover/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resources/ci.mgmt.yml b/sdk/resources/ci.mgmt.yml index 3fefd5254c85..ff65cb96d07d 100644 --- a/sdk/resources/ci.mgmt.yml +++ b/sdk/resources/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resources/ci.mgmt.yml - sdk/resources/Azure.ResourceManager.Resources/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resources/ci.mgmt.yml + - sdk/resources/Azure.ResourceManager.Resources/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/search/ci.mgmt.yml b/sdk/search/ci.mgmt.yml index a8c2a632c1c8..63c0e200644f 100644 --- a/sdk/search/ci.mgmt.yml +++ b/sdk/search/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/search/ci.mgmt.yml - sdk/search/Azure.ResourceManager.Search/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/search/ci.mgmt.yml + - sdk/search/Azure.ResourceManager.Search/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securitycenter/ci.mgmt.yml b/sdk/securitycenter/ci.mgmt.yml index c728522efab2..6ed8ff4d67a9 100644 --- a/sdk/securitycenter/ci.mgmt.yml +++ b/sdk/securitycenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securitycenter/ci.mgmt.yml - sdk/securitycenter/Azure.ResourceManager.SecurityCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securitycenter/ci.mgmt.yml + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securitydevops/ci.mgmt.yml b/sdk/securitydevops/ci.mgmt.yml index c5a54a9ad206..972d98a7376e 100644 --- a/sdk/securitydevops/ci.mgmt.yml +++ b/sdk/securitydevops/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securitydevops/ci.mgmt.yml - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securitydevops/ci.mgmt.yml + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securityinsights/ci.mgmt.yml b/sdk/securityinsights/ci.mgmt.yml index f1d428ebef90..0659cac2858f 100644 --- a/sdk/securityinsights/ci.mgmt.yml +++ b/sdk/securityinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securityinsights/ci.mgmt.yml - sdk/securityinsights/Azure.ResourceManager.SecurityInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securityinsights/ci.mgmt.yml + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/selfhelp/ci.mgmt.yml b/sdk/selfhelp/ci.mgmt.yml index bb6a162210eb..ac13ec845ce7 100644 --- a/sdk/selfhelp/ci.mgmt.yml +++ b/sdk/selfhelp/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/selfhelp/ci.mgmt.yml - sdk/selfhelp/Azure.ResourceManager.SelfHelp/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/selfhelp/ci.mgmt.yml + - sdk/selfhelp/Azure.ResourceManager.SelfHelp/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicebus/ci.mgmt.yml b/sdk/servicebus/ci.mgmt.yml index 02c45dc88e18..f2ead205ced6 100644 --- a/sdk/servicebus/ci.mgmt.yml +++ b/sdk/servicebus/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicebus/ci.mgmt.yml - sdk/servicebus/Azure.ResourceManager.ServiceBus/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicebus/ci.mgmt.yml + - sdk/servicebus/Azure.ResourceManager.ServiceBus/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicefabric/ci.mgmt.yml b/sdk/servicefabric/ci.mgmt.yml index 430f48c8c87b..afc886a4f7f2 100644 --- a/sdk/servicefabric/ci.mgmt.yml +++ b/sdk/servicefabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicefabric/ci.mgmt.yml - sdk/servicefabric/Azure.ResourceManager.ServiceFabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicefabric/ci.mgmt.yml + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicefabricmanagedclusters/ci.mgmt.yml b/sdk/servicefabricmanagedclusters/ci.mgmt.yml index e73289f589f4..022ac0f03cd1 100644 --- a/sdk/servicefabricmanagedclusters/ci.mgmt.yml +++ b/sdk/servicefabricmanagedclusters/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicefabricmanagedclusters/ci.mgmt.yml - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicefabricmanagedclusters/ci.mgmt.yml + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicelinker/ci.mgmt.yml b/sdk/servicelinker/ci.mgmt.yml index 77df314e977a..6069e04a3157 100644 --- a/sdk/servicelinker/ci.mgmt.yml +++ b/sdk/servicelinker/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicelinker/ci.mgmt.yml - sdk/servicelinker/Azure.ResourceManager.ServiceLinker/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicelinker/ci.mgmt.yml + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicenetworking/ci.mgmt.yml b/sdk/servicenetworking/ci.mgmt.yml index b2332ae15224..4551f1325475 100644 --- a/sdk/servicenetworking/ci.mgmt.yml +++ b/sdk/servicenetworking/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicenetworking/ci.mgmt.yml - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicenetworking/ci.mgmt.yml + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/signalr/ci.mgmt.yml b/sdk/signalr/ci.mgmt.yml index c934ed4314fa..f066849c56a1 100644 --- a/sdk/signalr/ci.mgmt.yml +++ b/sdk/signalr/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/signalr/ci.mgmt.yml - sdk/signalr/Azure.ResourceManager.SignalR/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/signalr/ci.mgmt.yml + - sdk/signalr/Azure.ResourceManager.SignalR/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sphere/ci.mgmt.yml b/sdk/sphere/ci.mgmt.yml index f3f33e9d00f4..749774244735 100644 --- a/sdk/sphere/ci.mgmt.yml +++ b/sdk/sphere/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/sphere/ci.mgmt.yml - sdk/sphere/Azure.ResourceManager.Sphere/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sphere/ci.mgmt.yml + - sdk/sphere/Azure.ResourceManager.Sphere/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/springappdiscovery/ci.mgmt.yml b/sdk/springappdiscovery/ci.mgmt.yml index 7676386684df..f86c14368089 100644 --- a/sdk/springappdiscovery/ci.mgmt.yml +++ b/sdk/springappdiscovery/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/springappdiscovery/ci.mgmt.yml - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/springappdiscovery/ci.mgmt.yml + - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sqlmanagement/ci.mgmt.yml b/sdk/sqlmanagement/ci.mgmt.yml index da93d03f2d33..8377a2663681 100644 --- a/sdk/sqlmanagement/ci.mgmt.yml +++ b/sdk/sqlmanagement/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/sqlmanagement/ci.mgmt.yml - sdk/sqlmanagement/Azure.ResourceManager.Sql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sqlmanagement/ci.mgmt.yml + - sdk/sqlmanagement/Azure.ResourceManager.Sql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sqlvirtualmachine/ci.mgmt.yml b/sdk/sqlvirtualmachine/ci.mgmt.yml index 28c6192fa86b..049e315855ed 100644 --- a/sdk/sqlvirtualmachine/ci.mgmt.yml +++ b/sdk/sqlvirtualmachine/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/sqlvirtualmachine/ci.mgmt.yml - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sqlvirtualmachine/ci.mgmt.yml + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/standbypool/ci.mgmt.yml b/sdk/standbypool/ci.mgmt.yml index 0763a516e2c1..54ce1137a123 100644 --- a/sdk/standbypool/ci.mgmt.yml +++ b/sdk/standbypool/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/standbypool/ci.mgmt.yml - sdk/standbypool/Azure.ResourceManager.StandbyPool/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/standbypool/ci.mgmt.yml + - sdk/standbypool/Azure.ResourceManager.StandbyPool/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storage/ci.mgmt.yml b/sdk/storage/ci.mgmt.yml index 95bc19b325d5..6f05608983be 100644 --- a/sdk/storage/ci.mgmt.yml +++ b/sdk/storage/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storage/ci.mgmt.yml - sdk/storage/Azure.ResourceManager.Storage/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storage/ci.mgmt.yml + - sdk/storage/Azure.ResourceManager.Storage/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storageactions/ci.mgmt.yml b/sdk/storageactions/ci.mgmt.yml index 27062b4565a8..b27838343a2e 100644 --- a/sdk/storageactions/ci.mgmt.yml +++ b/sdk/storageactions/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storageactions/ci.mgmt.yml - sdk/storageactions/Azure.ResourceManager.StorageActions/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storageactions/ci.mgmt.yml + - sdk/storageactions/Azure.ResourceManager.StorageActions/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagecache/ci.mgmt.yml b/sdk/storagecache/ci.mgmt.yml index c6abf63baf2c..84c922940939 100644 --- a/sdk/storagecache/ci.mgmt.yml +++ b/sdk/storagecache/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagecache/ci.mgmt.yml - sdk/storagecache/Azure.ResourceManager.StorageCache/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagecache/ci.mgmt.yml + - sdk/storagecache/Azure.ResourceManager.StorageCache/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagemover/ci.mgmt.yml b/sdk/storagemover/ci.mgmt.yml index e9055f49e1a9..4e45261a60aa 100644 --- a/sdk/storagemover/ci.mgmt.yml +++ b/sdk/storagemover/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagemover/ci.mgmt.yml - sdk/storagemover/Azure.ResourceManager.StorageMover/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagemover/ci.mgmt.yml + - sdk/storagemover/Azure.ResourceManager.StorageMover/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagepool/ci.mgmt.yml b/sdk/storagepool/ci.mgmt.yml index 2178fc390757..6592a12a262a 100644 --- a/sdk/storagepool/ci.mgmt.yml +++ b/sdk/storagepool/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagepool/ci.mgmt.yml - sdk/storagepool/Azure.ResourceManager.StoragePool/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagepool/ci.mgmt.yml + - sdk/storagepool/Azure.ResourceManager.StoragePool/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagesync/ci.mgmt.yml b/sdk/storagesync/ci.mgmt.yml index a8789947c687..b9fcbb66b30f 100644 --- a/sdk/storagesync/ci.mgmt.yml +++ b/sdk/storagesync/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagesync/ci.mgmt.yml - sdk/storagesync/Azure.ResourceManager.StorageSync/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagesync/ci.mgmt.yml + - sdk/storagesync/Azure.ResourceManager.StorageSync/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/streamanalytics/ci.mgmt.yml b/sdk/streamanalytics/ci.mgmt.yml index 09d108a1a7d9..860cd851bbd1 100644 --- a/sdk/streamanalytics/ci.mgmt.yml +++ b/sdk/streamanalytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/streamanalytics/ci.mgmt.yml - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/streamanalytics/ci.mgmt.yml + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/subscription/ci.mgmt.yml b/sdk/subscription/ci.mgmt.yml index f9067b4c0af3..a00a0e9c56ad 100644 --- a/sdk/subscription/ci.mgmt.yml +++ b/sdk/subscription/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/subscription/ci.mgmt.yml - sdk/subscription/Azure.ResourceManager.Subscription/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/subscription/ci.mgmt.yml + - sdk/subscription/Azure.ResourceManager.Subscription/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/support/ci.mgmt.yml b/sdk/support/ci.mgmt.yml index 5a947c4c4939..d5c857ad8346 100644 --- a/sdk/support/ci.mgmt.yml +++ b/sdk/support/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/support/ci.mgmt.yml - sdk/support/Azure.ResourceManager.Support/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/support/ci.mgmt.yml + - sdk/support/Azure.ResourceManager.Support/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/synapse/ci.mgmt.yml b/sdk/synapse/ci.mgmt.yml index 0a089a504291..18c8132c4803 100644 --- a/sdk/synapse/ci.mgmt.yml +++ b/sdk/synapse/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/synapse/ci.mgmt.yml - sdk/synapse/Azure.ResourceManager.Synapse/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/synapse/ci.mgmt.yml + - sdk/synapse/Azure.ResourceManager.Synapse/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/terraform/ci.mgmt.yml b/sdk/terraform/ci.mgmt.yml index 82c4c1f05a4c..5f7b3d41fb27 100644 --- a/sdk/terraform/ci.mgmt.yml +++ b/sdk/terraform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/terraform/ci.mgmt.yml - sdk/terraform/Azure.ResourceManager.Terraform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/terraform/ci.mgmt.yml + - sdk/terraform/Azure.ResourceManager.Terraform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders.cs similarity index 59% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders.cs index 30df8841a84d..71d5605944a4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders.cs @@ -5,17 +5,19 @@ #nullable disable +using System; using Azure.Core; namespace Azure.AI.TextAnalytics { - internal partial class MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders + internal partial class MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders { private readonly Response _response; - public MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders(Response response) + public MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders(Response response) { _response = response; } - public string OperationLocation => _response.Headers.TryGetValue("Operation-Location", out string value) ? value : null; + /// The location for monitoring the operation state. + public Uri OperationLocation => _response.Headers.TryGetValue("Operation-Location", out Uri value) ? value : null; } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders.cs similarity index 59% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders.cs index b490f7fc74ef..5678bc06ad5a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders.cs @@ -5,17 +5,19 @@ #nullable disable +using System; using Azure.Core; namespace Azure.AI.TextAnalytics { - internal partial class MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders + internal partial class MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders { private readonly Response _response; - public MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders(Response response) + public MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders(Response response) { _response = response; } - public string OperationLocation => _response.Headers.TryGetValue("Operation-Location", out string value) ? value : null; + /// The location for monitoring the operation state. + public Uri OperationLocation => _response.Headers.TryGetValue("Operation-Location", out Uri value) ? value : null; } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisRestClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisRestClient.cs index dd0abe02bafa..d0fb368db0f9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisRestClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/MicrosoftCognitiveLanguageServiceTextAnalysisRestClient.cs @@ -18,7 +18,6 @@ namespace Azure.AI.TextAnalytics internal partial class MicrosoftCognitiveLanguageServiceTextAnalysisRestClient { private readonly HttpPipeline _pipeline; - private readonly string _endpoint; private readonly string _apiVersion; /// The ClientDiagnostics is used to provide tracing support for the client library. @@ -27,24 +26,22 @@ internal partial class MicrosoftCognitiveLanguageServiceTextAnalysisRestClient /// Initializes a new instance of MicrosoftCognitiveLanguageServiceTextAnalysisRestClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). /// Api Version. - /// , , or is null. - public MicrosoftCognitiveLanguageServiceTextAnalysisRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2023-04-01") + /// , or is null. + public MicrosoftCognitiveLanguageServiceTextAnalysisRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "2023-04-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateAnalyzeRequest(AnalyzeTextTask body, bool? showStats) + internal HttpMessage CreateAnalyzeRequest(string endpoint, AnalyzeTextTask body, bool? showStats) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.AppendRaw(endpoint, true); uri.AppendRaw("/language", false); uri.AppendPath("/:analyze-text", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -62,19 +59,23 @@ internal HttpMessage CreateAnalyzeRequest(AnalyzeTextTask body, bool? showStats) } /// Request text analysis over a collection of documents. - /// Collection of documents to analyze and a single task to execute. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// The input documents to analyze. /// (Optional) if set to true, response will contain request and document level statistics. /// The cancellation token to use. - /// is null. - /// Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately. - public async Task> AnalyzeAsync(AnalyzeTextTask body, bool? showStats = null, CancellationToken cancellationToken = default) + /// or is null. + public async Task> AnalyzeAsync(string endpoint, AnalyzeTextTask body, bool? showStats = null, CancellationToken cancellationToken = default) { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } if (body == null) { throw new ArgumentNullException(nameof(body)); } - using var message = CreateAnalyzeRequest(body, showStats); + using var message = CreateAnalyzeRequest(endpoint, body, showStats); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -91,19 +92,23 @@ public async Task> AnalyzeAsync(AnalyzeTextTask } /// Request text analysis over a collection of documents. - /// Collection of documents to analyze and a single task to execute. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// The input documents to analyze. /// (Optional) if set to true, response will contain request and document level statistics. /// The cancellation token to use. - /// is null. - /// Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately. - public Response Analyze(AnalyzeTextTask body, bool? showStats = null, CancellationToken cancellationToken = default) + /// or is null. + public Response Analyze(string endpoint, AnalyzeTextTask body, bool? showStats = null, CancellationToken cancellationToken = default) { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } if (body == null) { throw new ArgumentNullException(nameof(body)); } - using var message = CreateAnalyzeRequest(body, showStats); + using var message = CreateAnalyzeRequest(endpoint, body, showStats); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -119,13 +124,13 @@ public Response Analyze(AnalyzeTextTask body, bool? showS } } - internal HttpMessage CreateAnalyzeBatchSubmitJobRequest(AnalyzeTextJobsInput body) + internal HttpMessage CreateAnalyzeTextSubmitJobRequest(string endpoint, AnalyzeTextJobsInput body) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.AppendRaw(endpoint, true); uri.AppendRaw("/language", false); uri.AppendPath("/analyze-text/jobs", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -138,21 +143,25 @@ internal HttpMessage CreateAnalyzeBatchSubmitJobRequest(AnalyzeTextJobsInput bod return message; } - /// Submit text analysis job. - /// Collection of documents to analyze and one or more tasks to execute. + /// Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// The to use. /// The cancellation token to use. - /// is null. - /// Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. - public async Task> AnalyzeBatchSubmitJobAsync(AnalyzeTextJobsInput body, CancellationToken cancellationToken = default) + /// or is null. + public async Task> AnalyzeTextSubmitJobAsync(string endpoint, AnalyzeTextJobsInput body, CancellationToken cancellationToken = default) { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } if (body == null) { throw new ArgumentNullException(nameof(body)); } - using var message = CreateAnalyzeBatchSubmitJobRequest(body); + using var message = CreateAnalyzeTextSubmitJobRequest(endpoint, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders(message.Response); + var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -162,21 +171,25 @@ public async Task Submit text analysis job. - /// Collection of documents to analyze and one or more tasks to execute. + /// Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// The to use. /// The cancellation token to use. - /// is null. - /// Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. - public ResponseWithHeaders AnalyzeBatchSubmitJob(AnalyzeTextJobsInput body, CancellationToken cancellationToken = default) + /// or is null. + public ResponseWithHeaders AnalyzeTextSubmitJob(string endpoint, AnalyzeTextJobsInput body, CancellationToken cancellationToken = default) { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } if (body == null) { throw new ArgumentNullException(nameof(body)); } - using var message = CreateAnalyzeBatchSubmitJobRequest(body); + using var message = CreateAnalyzeTextSubmitJobRequest(endpoint, body); _pipeline.Send(message, cancellationToken); - var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchSubmitJobHeaders(message.Response); + var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextSubmitJobHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -186,13 +199,13 @@ public ResponseWithHeaders Get analysis status and results. - /// Job ID. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// job ID. /// (Optional) if set to true, response will contain request and document level statistics. /// The maximum number of resources to return from the collection. /// An offset into the collection of the first resource to be returned. /// The cancellation token to use. - /// Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task. - public async Task> AnalyzeBatchJobStatusAsync(Guid jobId, bool? showStats = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + /// is null. + /// Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. + public async Task> AnalyzeTextJobStatusAsync(string endpoint, Guid jobId, bool? showStats = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) { - using var message = CreateAnalyzeBatchJobStatusRequest(jobId, showStats, top, skip); + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + using var message = CreateAnalyzeTextJobStatusRequest(endpoint, jobId, showStats, top, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -240,15 +260,22 @@ public async Task> AnalyzeBatchJobStatusAsync(Guid } /// Get analysis status and results. - /// Job ID. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// job ID. /// (Optional) if set to true, response will contain request and document level statistics. /// The maximum number of resources to return from the collection. /// An offset into the collection of the first resource to be returned. /// The cancellation token to use. - /// Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task. - public Response AnalyzeBatchJobStatus(Guid jobId, bool? showStats = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + /// is null. + /// Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. + public Response AnalyzeTextJobStatus(string endpoint, Guid jobId, bool? showStats = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) { - using var message = CreateAnalyzeBatchJobStatusRequest(jobId, showStats, top, skip); + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + using var message = CreateAnalyzeTextJobStatusRequest(endpoint, jobId, showStats, top, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -264,13 +291,13 @@ public Response AnalyzeBatchJobStatus(Guid jobId, bool? sho } } - internal HttpMessage CreateAnalyzeBatchCancelJobRequest(Guid jobId) + internal HttpMessage CreateAnalyzeTextCancelJobRequest(string endpoint, Guid jobId) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); + uri.AppendRaw(endpoint, true); uri.AppendRaw("/language", false); uri.AppendPath("/analyze-text/jobs/", false); uri.AppendPath(jobId, true); @@ -282,14 +309,20 @@ internal HttpMessage CreateAnalyzeBatchCancelJobRequest(Guid jobId) } /// Cancel a long-running Text Analysis job. - /// Job ID. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// The job ID to cancel. /// The cancellation token to use. - /// Cancel a long-running Text Analysis job. - public async Task> AnalyzeBatchCancelJobAsync(Guid jobId, CancellationToken cancellationToken = default) + /// is null. + public async Task> AnalyzeTextCancelJobAsync(string endpoint, Guid jobId, CancellationToken cancellationToken = default) { - using var message = CreateAnalyzeBatchCancelJobRequest(jobId); + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + using var message = CreateAnalyzeTextCancelJobRequest(endpoint, jobId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders(message.Response); + var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders(message.Response); switch (message.Response.Status) { case 202: @@ -300,14 +333,20 @@ public async Task Cancel a long-running Text Analysis job. - /// Job ID. + /// Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com). + /// The job ID to cancel. /// The cancellation token to use. - /// Cancel a long-running Text Analysis job. - public ResponseWithHeaders AnalyzeBatchCancelJob(Guid jobId, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders AnalyzeTextCancelJob(string endpoint, Guid jobId, CancellationToken cancellationToken = default) { - using var message = CreateAnalyzeBatchCancelJobRequest(jobId); + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + using var message = CreateAnalyzeTextCancelJobRequest(endpoint, jobId); _pipeline.Send(message, cancellationToken); - var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeBatchCancelJobHeaders(message.Response); + var headers = new MicrosoftCognitiveLanguageServiceTextAnalysisAnalyzeTextCancelJobHeaders(message.Response); switch (message.Response.Status) { case 202: diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.Serialization.cs index 8065ea334bd2..ddfc97572d5b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class AbstractiveSummarizationLROResult : IUtf8JsonSerializable + internal partial class AbstractiveSummarizationLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static AbstractiveSummarizationLROResult DeserializeAbstractiveSummarizationLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static AbstractiveSummarizationLROResult DeserializeAbstractiveSummariz return null; } AbstractiveSummarizationResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static AbstractiveSummarizationLROResult DeserializeAbstractiveSummariz results = AbstractiveSummarizationResult.DeserializeAbstractiveSummarizationResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new AbstractiveSummarizationLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new AbstractiveSummarizationLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static AbstractiveSummarizationLROResult DeserializeAbstractiveSummariz using var document = JsonDocument.Parse(response.Content); return DeserializeAbstractiveSummarizationLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.cs index fe204112cebe..6852635e6fb5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROResult.cs @@ -13,11 +13,11 @@ namespace Azure.AI.TextAnalytics.Models internal partial class AbstractiveSummarizationLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// An object representing the pre-build summarization results of each document. + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Results of the task. /// is null. - public AbstractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AbstractiveSummarizationResult results) : base(lastUpdateDateTime, status) + internal AbstractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AbstractiveSummarizationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public AbstractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, Text } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// An object representing the pre-build summarization results of each document. - internal AbstractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, AbstractiveSummarizationResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Results of the task. + internal AbstractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, AbstractiveSummarizationResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// An object representing the pre-build summarization results of each document. - public AbstractiveSummarizationResult Results { get; set; } + /// Results of the task. + public AbstractiveSummarizationResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.Serialization.cs index 762cb61b5d6e..79998aae4ad3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.Serialization.cs @@ -15,56 +15,21 @@ internal partial class AbstractiveSummarizationLROTask : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(Parameters); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters); + } if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static AbstractiveSummarizationLROTask DeserializeAbstractiveSummarizationLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AbstractiveSummarizationTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - parameters = AbstractiveSummarizationTaskParameters.DeserializeAbstractiveSummarizationTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new AbstractiveSummarizationLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AbstractiveSummarizationLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAbstractiveSummarizationLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.cs index 4ea8a0c30b62..0ec32670637a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationLROTask.cs @@ -5,35 +5,28 @@ #nullable disable -using System; - namespace Azure.AI.TextAnalytics.Models { /// An object representing the task definition for an Abstractive Summarization task. internal partial class AbstractiveSummarizationLROTask : AnalyzeTextLROTask { /// Initializes a new instance of . - /// Supported parameters for the pre-build Abstractive Summarization task. - /// is null. - public AbstractiveSummarizationLROTask(AbstractiveSummarizationTaskParameters parameters) + public AbstractiveSummarizationLROTask() { - Argument.AssertNotNull(parameters, nameof(parameters)); - - Parameters = parameters; Kind = AnalyzeTextLROTaskKind.AbstractiveSummarization; } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for the pre-build Abstractive Summarization task. + /// task name. + /// The kind of task to perform. + /// Parameters for the Abstractive Summarization task. internal AbstractiveSummarizationLROTask(string taskName, AnalyzeTextLROTaskKind kind, AbstractiveSummarizationTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for the pre-build Abstractive Summarization task. + /// Parameters for the Abstractive Summarization task. public AbstractiveSummarizationTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.Serialization.cs index ca426f0c177c..dcb3266b801a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.Serialization.cs @@ -7,49 +7,21 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class AbstractiveSummarizationResult : IUtf8JsonSerializable + internal partial class AbstractiveSummarizationResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - internal static AbstractiveSummarizationResult DeserializeAbstractiveSummarizationResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; - IList documents = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("errors"u8)) @@ -87,23 +59,15 @@ internal static AbstractiveSummarizationResult DeserializeAbstractiveSummarizati continue; } } - return new AbstractiveSummarizationResult(documents, errors, statistics, modelVersion); + return new AbstractiveSummarizationResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new AbstractiveSummarizationResult FromResponse(Response response) + internal static AbstractiveSummarizationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeAbstractiveSummarizationResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.cs index 152956060e0f..5194858a8a2f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResult.cs @@ -11,41 +11,45 @@ namespace Azure.AI.TextAnalytics.Models { - /// An object representing the pre-build summarization results of each document. - internal partial class AbstractiveSummarizationResult : AbstractiveSummarizationResultBase + /// An object representing the pre-built Abstractive Summarization results of each document. + internal partial class AbstractiveSummarizationResult { /// Initializes a new instance of . - /// Response by document. /// Errors by document id. /// This field indicates which model is used for scoring. - /// , or is null. - public AbstractiveSummarizationResult(IEnumerable documents, IEnumerable errors, string modelVersion) : base(documents) + /// Response by document. + /// , or is null. + internal AbstractiveSummarizationResult(IEnumerable errors, string modelVersion, IEnumerable documents) { - Argument.AssertNotNull(documents, nameof(documents)); Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); + Argument.AssertNotNull(documents, nameof(documents)); Errors = errors.ToList(); ModelVersion = modelVersion; + Documents = documents.ToList(); } /// Initializes a new instance of . - /// Response by document. /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. - internal AbstractiveSummarizationResult(IList documents, IList errors, TextDocumentBatchStatistics statistics, string modelVersion) : base(documents) + /// Response by document. + internal AbstractiveSummarizationResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { Errors = errors; Statistics = statistics; ModelVersion = modelVersion; + Documents = documents; } /// Errors by document id. - public IList Errors { get; } + public IReadOnlyList Errors { get; } /// if showStats=true was specified in the request this field will contain information about the request payload. - public TextDocumentBatchStatistics Statistics { get; set; } + public TextDocumentBatchStatistics Statistics { get; } /// This field indicates which model is used for scoring. - public string ModelVersion { get; set; } + public string ModelVersion { get; } + /// Response by document. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBase.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBase.Serialization.cs deleted file mode 100644 index f4487f23d27f..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBase.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class AbstractiveSummarizationResultBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static AbstractiveSummarizationResultBase DeserializeAbstractiveSummarizationResultBase(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList documents = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AbstractiveSummaryDocumentResult.DeserializeAbstractiveSummaryDocumentResult(item)); - } - documents = array; - continue; - } - } - return new AbstractiveSummarizationResultBase(documents); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AbstractiveSummarizationResultBase FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAbstractiveSummarizationResultBase(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBase.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBase.cs deleted file mode 100644 index fff56fe88fb9..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBase.cs +++ /dev/null @@ -1,37 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - /// An object representing the summarization results of each document. - internal partial class AbstractiveSummarizationResultBase - { - /// Initializes a new instance of . - /// Response by document. - /// is null. - public AbstractiveSummarizationResultBase(IEnumerable documents) - { - Argument.AssertNotNull(documents, nameof(documents)); - - Documents = documents.ToList(); - } - - /// Initializes a new instance of . - /// Response by document. - internal AbstractiveSummarizationResultBase(IList documents) - { - Documents = documents; - } - - /// Response by document. - public IList Documents { get; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.Serialization.cs index ad4a424b409a..98063aea1cd0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.Serialization.cs @@ -15,16 +15,16 @@ internal partial class AbstractiveSummarizationTaskParameters : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); writer.WriteBooleanValue(LoggingOptOut.Value); } + if (Optional.IsDefined(ModelVersion)) + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } if (Optional.IsDefined(SentenceCount)) { writer.WritePropertyName("sentenceCount"u8); @@ -38,64 +38,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AbstractiveSummarizationTaskParameters DeserializeAbstractiveSummarizationTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - bool? loggingOptOut = default; - int? sentenceCount = default; - StringIndexType? stringIndexType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("sentenceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sentenceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - } - return new AbstractiveSummarizationTaskParameters(sentenceCount, stringIndexType, modelVersion, loggingOptOut); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AbstractiveSummarizationTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAbstractiveSummarizationTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.cs index bb6cb9c5ac19..f885117c5a3a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParameters.cs @@ -7,8 +7,8 @@ namespace Azure.AI.TextAnalytics.Models { - /// Supported parameters for the pre-build Abstractive Summarization task. - internal partial class AbstractiveSummarizationTaskParameters : AbstractiveSummarizationTaskParametersBase + /// Supported parameters for the pre-built Abstractive Summarization task. + internal partial class AbstractiveSummarizationTaskParameters { /// Initializes a new instance of . public AbstractiveSummarizationTaskParameters() @@ -16,19 +16,25 @@ public AbstractiveSummarizationTaskParameters() } /// Initializes a new instance of . - /// It controls the approximate number of sentences in the output summaries. - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - /// - /// - internal AbstractiveSummarizationTaskParameters(int? sentenceCount, StringIndexType? stringIndexType, string modelVersion, bool? loggingOptOut) : base(sentenceCount, stringIndexType) + /// logging opt out. + /// model version. + /// Controls the approximate number of sentences in the output summaries. + /// String index type. + internal AbstractiveSummarizationTaskParameters(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType) { - ModelVersion = modelVersion; LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; + SentenceCount = sentenceCount; + StringIndexType = stringIndexType; } - /// Gets or sets the model version. - public string ModelVersion { get; set; } - /// Gets or sets the logging opt out. + /// logging opt out. public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Controls the approximate number of sentences in the output summaries. + public int? SentenceCount { get; set; } + /// String index type. + public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParametersBase.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParametersBase.Serialization.cs deleted file mode 100644 index 95e1928f582b..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParametersBase.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class AbstractiveSummarizationTaskParametersBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SentenceCount)) - { - writer.WritePropertyName("sentenceCount"u8); - writer.WriteNumberValue(SentenceCount.Value); - } - if (Optional.IsDefined(StringIndexType)) - { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static AbstractiveSummarizationTaskParametersBase DeserializeAbstractiveSummarizationTaskParametersBase(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? sentenceCount = default; - StringIndexType? stringIndexType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sentenceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sentenceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - } - return new AbstractiveSummarizationTaskParametersBase(sentenceCount, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AbstractiveSummarizationTaskParametersBase FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAbstractiveSummarizationTaskParametersBase(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParametersBase.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParametersBase.cs deleted file mode 100644 index 76ce20ec0146..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationTaskParametersBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// Supported parameters for an Abstractive Summarization task. - internal partial class AbstractiveSummarizationTaskParametersBase - { - /// Initializes a new instance of . - public AbstractiveSummarizationTaskParametersBase() - { - } - - /// Initializes a new instance of . - /// It controls the approximate number of sentences in the output summaries. - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal AbstractiveSummarizationTaskParametersBase(int? sentenceCount, StringIndexType? stringIndexType) - { - SentenceCount = sentenceCount; - StringIndexType = stringIndexType; - } - - /// It controls the approximate number of sentences in the output summaries. - public int? SentenceCount { get; set; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - public StringIndexType? StringIndexType { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs index 96123db37230..be77df9d5677 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class AbstractiveSummaryDocumentResult : IUtf8JsonSerializable + internal partial class AbstractiveSummaryDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("summaries"u8); - writer.WriteStartArray(); - foreach (var item in Summaries) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static AbstractiveSummaryDocumentResult DeserializeAbstractiveSummaryDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList summaries = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList summaries = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("summaries"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AbstractiveSummaryInternal.DeserializeAbstractiveSummaryInternal(item)); - } - summaries = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -86,24 +48,26 @@ internal static AbstractiveSummaryDocumentResult DeserializeAbstractiveSummaryDo statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("summaries"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AbstractiveSummaryInternal.DeserializeAbstractiveSummaryInternal(item)); + } + summaries = array; + continue; + } } return new AbstractiveSummaryDocumentResult(id, warnings, statistics, summaries); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new AbstractiveSummaryDocumentResult FromResponse(Response response) + internal static AbstractiveSummaryDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeAbstractiveSummaryDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs index e376c81074ed..14bf467d7916 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// An object representing the summarization result of a single document. - internal partial class AbstractiveSummaryDocumentResult : DocumentResult + /// An object representing the pre-built Abstractive Summarization results of each document. + internal partial class AbstractiveSummaryDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// A list of abstractive summaries. /// , or is null. - public AbstractiveSummaryDocumentResult(string id, IEnumerable warnings, IEnumerable summaries) : base(id, warnings) + internal AbstractiveSummaryDocumentResult(string id, IEnumerable warnings, IEnumerable summaries) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(summaries, nameof(summaries)); + Id = id; + Warnings = warnings.ToList(); Summaries = summaries.ToList(); } @@ -33,12 +35,21 @@ public AbstractiveSummaryDocumentResult(string id, IEnumerable /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// A list of abstractive summaries. - internal AbstractiveSummaryDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList summaries) : base(id, warnings, statistics) + internal AbstractiveSummaryDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList summaries) { + Id = id; + Warnings = warnings; + Statistics = statistics; Summaries = summaries; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// A list of abstractive summaries. - public IList Summaries { get; } + public IReadOnlyList Summaries { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs index 082a22ee856f..bfb0c4a28dda 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs @@ -7,30 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class AbstractiveSummaryInternal : IUtf8JsonSerializable + internal partial class AbstractiveSummaryInternal { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - if (Optional.IsCollectionDefined(Contexts)) - { - writer.WritePropertyName("contexts"u8); - writer.WriteStartArray(); - foreach (var item in Contexts) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - internal static AbstractiveSummaryInternal DeserializeAbstractiveSummaryInternal(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -38,7 +19,7 @@ internal static AbstractiveSummaryInternal DeserializeAbstractiveSummaryInternal return null; } string text = default; - IList contexts = default; + IReadOnlyList contexts = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text"u8)) @@ -71,13 +52,5 @@ internal static AbstractiveSummaryInternal FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeAbstractiveSummaryInternal(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs index 453d86b5cfa7..8f99b1d672a0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs @@ -16,7 +16,7 @@ internal partial class AbstractiveSummaryInternal /// Initializes a new instance of . /// The text of the summary. /// is null. - public AbstractiveSummaryInternal(string text) + internal AbstractiveSummaryInternal(string text) { Argument.AssertNotNull(text, nameof(text)); @@ -27,15 +27,15 @@ public AbstractiveSummaryInternal(string text) /// Initializes a new instance of . /// The text of the summary. /// The context list of the summary. - internal AbstractiveSummaryInternal(string text, IList contexts) + internal AbstractiveSummaryInternal(string text, IReadOnlyList contexts) { Text = text; Contexts = contexts; } /// The text of the summary. - public string Text { get; set; } + public string Text { get; } /// The context list of the summary. - public IList Contexts { get; } + public IReadOnlyList Contexts { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityLinkingInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityLinkingInput.cs index 7d2fe702a155..fb2b23316f24 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityLinkingInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityLinkingInput.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextEntityLinkingInput. + /// Contains the analyze text Entity linking input. internal partial class AnalyzeTextEntityLinkingInput : AnalyzeTextTask { /// Initializes a new instance of . @@ -17,9 +17,9 @@ public AnalyzeTextEntityLinkingInput() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. - /// - /// Supported parameters for an Entity Linking task. + /// The kind of task to perform. + /// Contains the analysis input to be handled by the service. + /// Task parameters. internal AnalyzeTextEntityLinkingInput(AnalyzeTextTaskKind kind, MultiLanguageAnalysisInput analysisInput, EntityLinkingTaskParameters parameters) : base(kind) { AnalysisInput = analysisInput; @@ -27,9 +27,9 @@ internal AnalyzeTextEntityLinkingInput(AnalyzeTextTaskKind kind, MultiLanguageAn Kind = kind; } - /// Gets or sets the analysis input. + /// Contains the analysis input to be handled by the service. public MultiLanguageAnalysisInput AnalysisInput { get; set; } - /// Supported parameters for an Entity Linking task. + /// Task parameters. public EntityLinkingTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityRecognitionInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityRecognitionInput.cs index c69b13f61221..86baa4564984 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityRecognitionInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextEntityRecognitionInput.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextEntityRecognitionInput. + /// The entity recognition analyze text input task request. internal partial class AnalyzeTextEntityRecognitionInput : AnalyzeTextTask { /// Initializes a new instance of . @@ -17,9 +17,9 @@ public AnalyzeTextEntityRecognitionInput() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. - /// - /// Supported parameters for an Entity Recognition task. + /// The kind of task to perform. + /// The input to be analyzed. + /// Task parameters. internal AnalyzeTextEntityRecognitionInput(AnalyzeTextTaskKind kind, MultiLanguageAnalysisInput analysisInput, EntitiesTaskParameters parameters) : base(kind) { AnalysisInput = analysisInput; @@ -27,9 +27,9 @@ internal AnalyzeTextEntityRecognitionInput(AnalyzeTextTaskKind kind, MultiLangua Kind = kind; } - /// Gets or sets the analysis input. + /// The input to be analyzed. public MultiLanguageAnalysisInput AnalysisInput { get; set; } - /// Supported parameters for an Entity Recognition task. + /// Task parameters. public EntitiesTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.Serialization.cs index 692b3289b34a..739b0fe3eb03 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.Serialization.cs @@ -19,32 +19,18 @@ internal static AnalyzeTextJobState DeserializeAnalyzeTextJobState(JsonElement e { return null; } - AnalyzeTasks tasks = default; - TextDocumentBatchStatistics statistics = default; string displayName = default; DateTimeOffset createdDateTime = default; DateTimeOffset? expirationDateTime = default; - string jobId = default; + Guid jobId = default; DateTimeOffset lastUpdatedDateTime = default; TextAnalyticsOperationStatus status = default; IReadOnlyList errors = default; string nextLink = default; + Tasks tasks = default; + TextDocumentBatchStatistics statistics = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("tasks"u8)) - { - tasks = AnalyzeTasks.DeserializeAnalyzeTasks(property.Value); - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentBatchStatistics.DeserializeTextDocumentBatchStatistics(property.Value); - continue; - } if (property.NameEquals("displayName"u8)) { displayName = property.Value.GetString(); @@ -66,7 +52,7 @@ internal static AnalyzeTextJobState DeserializeAnalyzeTextJobState(JsonElement e } if (property.NameEquals("jobId"u8)) { - jobId = property.Value.GetString(); + jobId = property.Value.GetGuid(); continue; } if (property.NameEquals("lastUpdatedDateTime"u8)) @@ -98,6 +84,20 @@ internal static AnalyzeTextJobState DeserializeAnalyzeTextJobState(JsonElement e nextLink = property.Value.GetString(); continue; } + if (property.NameEquals("tasks"u8)) + { + tasks = Tasks.DeserializeTasks(property.Value); + continue; + } + if (property.NameEquals("statistics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statistics = TextDocumentBatchStatistics.DeserializeTextDocumentBatchStatistics(property.Value); + continue; + } } return new AnalyzeTextJobState( displayName, @@ -114,7 +114,7 @@ internal static AnalyzeTextJobState DeserializeAnalyzeTextJobState(JsonElement e /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new AnalyzeTextJobState FromResponse(Response response) + internal static AnalyzeTextJobState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeAnalyzeTextJobState(document.RootElement); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.cs index 428ef5874f5a..79adb45d42af 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobState.cs @@ -10,43 +10,71 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextJobState. - internal partial class AnalyzeTextJobState : JobState + /// The object containing the analyze job LRO job state. + internal partial class AnalyzeTextJobState { /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// or is null. - internal AnalyzeTextJobState(DateTimeOffset createdDateTime, string jobId, DateTimeOffset lastUpdatedDateTime, TextAnalyticsOperationStatus status, AnalyzeTasks tasks) : base(createdDateTime, jobId, lastUpdatedDateTime, status) + /// Date and time job created. + /// job ID. + /// last updated date and time. + /// status. + /// List of tasks. + /// is null. + internal AnalyzeTextJobState(DateTimeOffset createdDateTime, Guid jobId, DateTimeOffset lastUpdatedDateTime, TextAnalyticsOperationStatus status, Tasks tasks) { - Argument.AssertNotNull(jobId, nameof(jobId)); Argument.AssertNotNull(tasks, nameof(tasks)); + CreatedDateTime = createdDateTime; + JobId = jobId; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Errors = new ChangeTrackingList(); Tasks = tasks; } /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// display name. + /// Date and time job created. + /// Date and time job expires. + /// job ID. + /// last updated date and time. + /// status. + /// errors. + /// next link. + /// List of tasks. /// if showStats=true was specified in the request this field will contain information about the request payload. - internal AnalyzeTextJobState(string displayName, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string jobId, DateTimeOffset lastUpdatedDateTime, TextAnalyticsOperationStatus status, IReadOnlyList errors, string nextLink, AnalyzeTasks tasks, TextDocumentBatchStatistics statistics) : base(displayName, createdDateTime, expirationDateTime, jobId, lastUpdatedDateTime, status, errors, nextLink) + internal AnalyzeTextJobState(string displayName, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, Guid jobId, DateTimeOffset lastUpdatedDateTime, TextAnalyticsOperationStatus status, IReadOnlyList errors, string nextLink, Tasks tasks, TextDocumentBatchStatistics statistics) { + DisplayName = displayName; + CreatedDateTime = createdDateTime; + ExpirationDateTime = expirationDateTime; + JobId = jobId; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Errors = errors; + NextLink = nextLink; Tasks = tasks; Statistics = statistics; } - /// Gets the tasks. - public AnalyzeTasks Tasks { get; } + /// display name. + public string DisplayName { get; } + /// Date and time job created. + public DateTimeOffset CreatedDateTime { get; } + /// Date and time job expires. + public DateTimeOffset? ExpirationDateTime { get; } + /// job ID. + public Guid JobId { get; } + /// last updated date and time. + public DateTimeOffset LastUpdatedDateTime { get; } + /// status. + public TextAnalyticsOperationStatus Status { get; } + /// errors. + public IReadOnlyList Errors { get; } + /// next link. + public string NextLink { get; } + /// List of tasks. + public Tasks Tasks { get; } /// if showStats=true was specified in the request this field will contain information about the request payload. public TextDocumentBatchStatistics Statistics { get; } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobStatistics.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobStatistics.Serialization.cs deleted file mode 100644 index 8e47f382446e..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobStatistics.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class AnalyzeTextJobStatistics - { - internal static AnalyzeTextJobStatistics DeserializeAnalyzeTextJobStatistics(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TextDocumentBatchStatistics statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentBatchStatistics.DeserializeTextDocumentBatchStatistics(property.Value); - continue; - } - } - return new AnalyzeTextJobStatistics(statistics); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AnalyzeTextJobStatistics FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAnalyzeTextJobStatistics(document.RootElement); - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobStatistics.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobStatistics.cs deleted file mode 100644 index 572e6b49d676..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobStatistics.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// The AnalyzeTextJobStatistics. - internal partial class AnalyzeTextJobStatistics - { - /// Initializes a new instance of . - internal AnalyzeTextJobStatistics() - { - } - - /// Initializes a new instance of . - /// if showStats=true was specified in the request this field will contain information about the request payload. - internal AnalyzeTextJobStatistics(TextDocumentBatchStatistics statistics) - { - Statistics = statistics; - } - - /// if showStats=true was specified in the request this field will contain information about the request payload. - public TextDocumentBatchStatistics Statistics { get; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobsInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobsInput.cs index 3ac64583a030..00d1d42c9a7e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobsInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextJobsInput.cs @@ -11,13 +11,13 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextJobsInput. + /// The input object for the analyze text LRO. internal partial class AnalyzeTextJobsInput { /// Initializes a new instance of . - /// + /// Contains the input to be analyzed. /// - /// The set of tasks to execute on the input documents. + /// List of tasks to be performed as part of the LRO. /// 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 . /// @@ -32,10 +32,10 @@ public AnalyzeTextJobsInput(MultiLanguageAnalysisInput analysisInput, IEnumerabl } /// Initializes a new instance of . - /// Optional display name for the analysis job. - /// + /// Name for the task. + /// Contains the input to be analyzed. /// - /// The set of tasks to execute on the input documents. + /// List of tasks to be performed as part of the LRO. /// 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 . /// @@ -46,12 +46,12 @@ internal AnalyzeTextJobsInput(string displayName, MultiLanguageAnalysisInput ana Tasks = tasks; } - /// Optional display name for the analysis job. + /// Name for the task. public string DisplayName { get; set; } - /// Gets the analysis input. + /// Contains the input to be analyzed. public MultiLanguageAnalysisInput AnalysisInput { get; } /// - /// The set of tasks to execute on the input documents. + /// List of tasks to be performed as part of the LRO. /// 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 . /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextKeyPhraseExtractionInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextKeyPhraseExtractionInput.cs index 2d20f0e88bff..bd0f1be828f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextKeyPhraseExtractionInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextKeyPhraseExtractionInput.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextKeyPhraseExtractionInput. + /// Contains the analyze text KeyPhraseExtraction task input. internal partial class AnalyzeTextKeyPhraseExtractionInput : AnalyzeTextTask { /// Initializes a new instance of . @@ -17,9 +17,9 @@ public AnalyzeTextKeyPhraseExtractionInput() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. - /// - /// Supported parameters for a Key Phrase Extraction task. + /// The kind of task to perform. + /// Contains the input documents. + /// Key phrase extraction task parameters. internal AnalyzeTextKeyPhraseExtractionInput(AnalyzeTextTaskKind kind, MultiLanguageAnalysisInput analysisInput, KeyPhraseTaskParameters parameters) : base(kind) { AnalysisInput = analysisInput; @@ -27,9 +27,9 @@ internal AnalyzeTextKeyPhraseExtractionInput(AnalyzeTextTaskKind kind, MultiLang Kind = kind; } - /// Gets or sets the analysis input. + /// Contains the input documents. public MultiLanguageAnalysisInput AnalysisInput { get; set; } - /// Supported parameters for a Key Phrase Extraction task. + /// Key phrase extraction task parameters. public KeyPhraseTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.Serialization.cs index 172f74e44e05..10020485c219 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.Serialization.cs @@ -6,29 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class AnalyzeTextLROResult : IUtf8JsonSerializable + internal partial class AnalyzeTextLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static AnalyzeTextLROResult DeserializeAnalyzeTextLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -57,18 +39,10 @@ internal static AnalyzeTextLROResult DeserializeAnalyzeTextLROResult(JsonElement /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new AnalyzeTextLROResult FromResponse(Response response) + internal static AnalyzeTextLROResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeAnalyzeTextLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.cs index 9b13dfe853c8..af6765a5c0b8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResult.cs @@ -10,33 +10,41 @@ namespace Azure.AI.TextAnalytics.Models { /// - /// The AnalyzeTextLROResult. + /// Contains the AnalyzeText long running operation result object. /// 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 abstract partial class AnalyzeTextLROResult : TaskState + internal abstract partial class AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - protected AnalyzeTextLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status) : base(lastUpdateDateTime, status) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + protected AnalyzeTextLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status) { + LastUpdateDateTime = lastUpdateDateTime; + Status = status; } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - internal AnalyzeTextLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName) : base(lastUpdateDateTime, status) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + internal AnalyzeTextLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind) { - Kind = kind; + LastUpdateDateTime = lastUpdateDateTime; + Status = status; TaskName = taskName; + Kind = kind; } - /// Enumeration of supported Text Analysis long-running operation task results. + /// The last updated time in UTC for the task. + public DateTimeOffset LastUpdateDateTime { get; } + /// The status of the task at the mentioned last update time. + public TextAnalyticsOperationStatus Status { get; } + /// task name. + public string TaskName { get; } + /// Kind of the task. internal AnalyzeTextLROResultsKind Kind { get; set; } - /// Gets or sets the task name. - public string TaskName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResultsKind.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResultsKind.cs index 2e377d47db46..bb4fe4fed170 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResultsKind.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROResultsKind.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// Enumeration of supported Text Analysis long-running operation task results. + /// The kind of the response object returned by the analyze-text long running task. internal readonly partial struct AnalyzeTextLROResultsKind : IEquatable { private readonly string _value; @@ -28,33 +28,33 @@ public AnalyzeTextLROResultsKind(string value) private const string KeyPhraseExtractionLROResultsValue = "KeyPhraseExtractionLROResults"; private const string EntityLinkingLROResultsValue = "EntityLinkingLROResults"; private const string HealthcareLROResultsValue = "HealthcareLROResults"; - private const string ExtractiveSummarizationLROResultsValue = "ExtractiveSummarizationLROResults"; private const string CustomEntityRecognitionLROResultsValue = "CustomEntityRecognitionLROResults"; private const string CustomSingleLabelClassificationLROResultsValue = "CustomSingleLabelClassificationLROResults"; private const string CustomMultiLabelClassificationLROResultsValue = "CustomMultiLabelClassificationLROResults"; + private const string ExtractiveSummarizationLROResultsValue = "ExtractiveSummarizationLROResults"; private const string AbstractiveSummarizationLROResultsValue = "AbstractiveSummarizationLROResults"; - /// SentimentAnalysisLROResults. + /// Sentiment analysis LRO results. public static AnalyzeTextLROResultsKind SentimentAnalysisLROResults { get; } = new AnalyzeTextLROResultsKind(SentimentAnalysisLROResultsValue); - /// EntityRecognitionLROResults. + /// Entity recognition LRO results. public static AnalyzeTextLROResultsKind EntityRecognitionLROResults { get; } = new AnalyzeTextLROResultsKind(EntityRecognitionLROResultsValue); - /// PiiEntityRecognitionLROResults. + /// PII entity recognition LRO results. public static AnalyzeTextLROResultsKind PiiEntityRecognitionLROResults { get; } = new AnalyzeTextLROResultsKind(PiiEntityRecognitionLROResultsValue); - /// KeyPhraseExtractionLROResults. + /// Key phrase extraction LRO results. public static AnalyzeTextLROResultsKind KeyPhraseExtractionLROResults { get; } = new AnalyzeTextLROResultsKind(KeyPhraseExtractionLROResultsValue); - /// EntityLinkingLROResults. + /// Entity linking LRO results. public static AnalyzeTextLROResultsKind EntityLinkingLROResults { get; } = new AnalyzeTextLROResultsKind(EntityLinkingLROResultsValue); - /// HealthcareLROResults. + /// Healthcare LRO results. public static AnalyzeTextLROResultsKind HealthcareLROResults { get; } = new AnalyzeTextLROResultsKind(HealthcareLROResultsValue); - /// ExtractiveSummarizationLROResults. - public static AnalyzeTextLROResultsKind ExtractiveSummarizationLROResults { get; } = new AnalyzeTextLROResultsKind(ExtractiveSummarizationLROResultsValue); - /// CustomEntityRecognitionLROResults. + /// Custom entity recognition LRO results. public static AnalyzeTextLROResultsKind CustomEntityRecognitionLROResults { get; } = new AnalyzeTextLROResultsKind(CustomEntityRecognitionLROResultsValue); - /// CustomSingleLabelClassificationLROResults. + /// Custom single label classification LRO results. public static AnalyzeTextLROResultsKind CustomSingleLabelClassificationLROResults { get; } = new AnalyzeTextLROResultsKind(CustomSingleLabelClassificationLROResultsValue); - /// CustomMultiLabelClassificationLROResults. + /// Custom multi label classification LRO results. public static AnalyzeTextLROResultsKind CustomMultiLabelClassificationLROResults { get; } = new AnalyzeTextLROResultsKind(CustomMultiLabelClassificationLROResultsValue); - /// AbstractiveSummarizationLROResults. + /// Extractive summarization LRO results. + public static AnalyzeTextLROResultsKind ExtractiveSummarizationLROResults { get; } = new AnalyzeTextLROResultsKind(ExtractiveSummarizationLROResultsValue); + /// Abstractive summarization LRO results. public static AnalyzeTextLROResultsKind AbstractiveSummarizationLROResults { get; } = new AnalyzeTextLROResultsKind(AbstractiveSummarizationLROResultsValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextLROResultsKind left, AnalyzeTextLROResultsKind right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.Serialization.cs index 2c5b75b3c680..240f09b20935 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.Serialization.cs @@ -15,52 +15,18 @@ internal partial class AnalyzeTextLROTask : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static AnalyzeTextLROTask DeserializeAnalyzeTextLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("kind", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AbstractiveSummarization": return AbstractiveSummarizationLROTask.DeserializeAbstractiveSummarizationLROTask(element); - case "CustomEntityRecognition": return CustomEntitiesLROTask.DeserializeCustomEntitiesLROTask(element); - case "CustomMultiLabelClassification": return CustomMultiLabelClassificationLROTask.DeserializeCustomMultiLabelClassificationLROTask(element); - case "CustomSingleLabelClassification": return CustomSingleLabelClassificationLROTask.DeserializeCustomSingleLabelClassificationLROTask(element); - case "EntityLinking": return EntityLinkingLROTask.DeserializeEntityLinkingLROTask(element); - case "EntityRecognition": return EntitiesLROTask.DeserializeEntitiesLROTask(element); - case "ExtractiveSummarization": return ExtractiveSummarizationLROTask.DeserializeExtractiveSummarizationLROTask(element); - case "Healthcare": return HealthcareLROTask.DeserializeHealthcareLROTask(element); - case "KeyPhraseExtraction": return KeyPhraseLROTask.DeserializeKeyPhraseLROTask(element); - case "PiiEntityRecognition": return PiiLROTask.DeserializePiiLROTask(element); - case "SentimentAnalysis": return SentimentAnalysisLROTask.DeserializeSentimentAnalysisLROTask(element); - } - } - return UnknownAnalyzeTextLROTask.DeserializeUnknownAnalyzeTextLROTask(element); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AnalyzeTextLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAnalyzeTextLROTask(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.cs index f4cf6ac92b0c..b0b4872d36ba 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTask.cs @@ -8,11 +8,11 @@ namespace Azure.AI.TextAnalytics.Models { /// - /// The AnalyzeTextLROTask. + /// The long running task to be performed by the service on the input documents. /// 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 abstract partial class AnalyzeTextLROTask : TaskIdentifier + internal abstract partial class AnalyzeTextLROTask { /// Initializes a new instance of . protected AnalyzeTextLROTask() @@ -20,14 +20,17 @@ protected AnalyzeTextLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - internal AnalyzeTextLROTask(string taskName, AnalyzeTextLROTaskKind kind) : base(taskName) + /// task name. + /// The kind of task to perform. + internal AnalyzeTextLROTask(string taskName, AnalyzeTextLROTaskKind kind) { + TaskName = taskName; Kind = kind; } - /// Enumeration of supported long-running Text Analysis tasks. + /// task name. + public string TaskName { get; set; } + /// The kind of task to perform. internal AnalyzeTextLROTaskKind Kind { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTaskKind.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTaskKind.cs index 1c982ec66517..88d427b59293 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTaskKind.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLROTaskKind.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// Enumeration of supported long-running Text Analysis tasks. + /// The kind of the long running analyze text tasks supported. internal readonly partial struct AnalyzeTextLROTaskKind : IEquatable { private readonly string _value; @@ -28,33 +28,33 @@ public AnalyzeTextLROTaskKind(string value) private const string KeyPhraseExtractionValue = "KeyPhraseExtraction"; private const string EntityLinkingValue = "EntityLinking"; private const string HealthcareValue = "Healthcare"; - private const string ExtractiveSummarizationValue = "ExtractiveSummarization"; private const string CustomEntityRecognitionValue = "CustomEntityRecognition"; private const string CustomSingleLabelClassificationValue = "CustomSingleLabelClassification"; private const string CustomMultiLabelClassificationValue = "CustomMultiLabelClassification"; + private const string ExtractiveSummarizationValue = "ExtractiveSummarization"; private const string AbstractiveSummarizationValue = "AbstractiveSummarization"; - /// SentimentAnalysis. + /// Sentiment analysis task. public static AnalyzeTextLROTaskKind SentimentAnalysis { get; } = new AnalyzeTextLROTaskKind(SentimentAnalysisValue); - /// EntityRecognition. + /// Entity recognition task. public static AnalyzeTextLROTaskKind EntityRecognition { get; } = new AnalyzeTextLROTaskKind(EntityRecognitionValue); - /// PiiEntityRecognition. + /// PII entity recognition task. public static AnalyzeTextLROTaskKind PiiEntityRecognition { get; } = new AnalyzeTextLROTaskKind(PiiEntityRecognitionValue); - /// KeyPhraseExtraction. + /// Key phrase extraction task. public static AnalyzeTextLROTaskKind KeyPhraseExtraction { get; } = new AnalyzeTextLROTaskKind(KeyPhraseExtractionValue); - /// EntityLinking. + /// Entity linking task. public static AnalyzeTextLROTaskKind EntityLinking { get; } = new AnalyzeTextLROTaskKind(EntityLinkingValue); - /// Healthcare. + /// Healthcare task. public static AnalyzeTextLROTaskKind Healthcare { get; } = new AnalyzeTextLROTaskKind(HealthcareValue); - /// ExtractiveSummarization. - public static AnalyzeTextLROTaskKind ExtractiveSummarization { get; } = new AnalyzeTextLROTaskKind(ExtractiveSummarizationValue); - /// CustomEntityRecognition. + /// Custom entity recognition task. public static AnalyzeTextLROTaskKind CustomEntityRecognition { get; } = new AnalyzeTextLROTaskKind(CustomEntityRecognitionValue); - /// CustomSingleLabelClassification. + /// Custom single label classification task. public static AnalyzeTextLROTaskKind CustomSingleLabelClassification { get; } = new AnalyzeTextLROTaskKind(CustomSingleLabelClassificationValue); - /// CustomMultiLabelClassification. + /// Custom multi label classification task. public static AnalyzeTextLROTaskKind CustomMultiLabelClassification { get; } = new AnalyzeTextLROTaskKind(CustomMultiLabelClassificationValue); - /// AbstractiveSummarization. + /// Extractive summarization task. + public static AnalyzeTextLROTaskKind ExtractiveSummarization { get; } = new AnalyzeTextLROTaskKind(ExtractiveSummarizationValue); + /// Abstractive summarization task. public static AnalyzeTextLROTaskKind AbstractiveSummarization { get; } = new AnalyzeTextLROTaskKind(AbstractiveSummarizationValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextLROTaskKind left, AnalyzeTextLROTaskKind right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLanguageDetectionInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLanguageDetectionInput.cs index f465872cfd6b..c7c94e6c21bc 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLanguageDetectionInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextLanguageDetectionInput.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextLanguageDetectionInput. + /// Contains the language detection document analysis task input. internal partial class AnalyzeTextLanguageDetectionInput : AnalyzeTextTask { /// Initializes a new instance of . @@ -17,9 +17,9 @@ public AnalyzeTextLanguageDetectionInput() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. - /// - /// Supported parameters for a Language Detection task. + /// The kind of task to perform. + /// Documents to be analyzed. + /// task parameters. internal AnalyzeTextLanguageDetectionInput(AnalyzeTextTaskKind kind, LanguageDetectionAnalysisInput analysisInput, LanguageDetectionTaskParameters parameters) : base(kind) { AnalysisInput = analysisInput; @@ -27,9 +27,9 @@ internal AnalyzeTextLanguageDetectionInput(AnalyzeTextTaskKind kind, LanguageDet Kind = kind; } - /// Gets or sets the analysis input. + /// Documents to be analyzed. public LanguageDetectionAnalysisInput AnalysisInput { get; set; } - /// Supported parameters for a Language Detection task. + /// task parameters. public LanguageDetectionTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextPiiEntitiesRecognitionInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextPiiEntitiesRecognitionInput.cs index 9ca27601cd3d..8ab523ead415 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextPiiEntitiesRecognitionInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextPiiEntitiesRecognitionInput.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextPiiEntitiesRecognitionInput. + /// Contains the analyze text PIIEntityRecognition task input. internal partial class AnalyzeTextPiiEntitiesRecognitionInput : AnalyzeTextTask { /// Initializes a new instance of . @@ -17,9 +17,9 @@ public AnalyzeTextPiiEntitiesRecognitionInput() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. - /// - /// Supported parameters for a PII Entities Recognition task. + /// The kind of task to perform. + /// Contains the input documents. + /// Pii task parameters. internal AnalyzeTextPiiEntitiesRecognitionInput(AnalyzeTextTaskKind kind, MultiLanguageAnalysisInput analysisInput, PiiTaskParameters parameters) : base(kind) { AnalysisInput = analysisInput; @@ -27,9 +27,9 @@ internal AnalyzeTextPiiEntitiesRecognitionInput(AnalyzeTextTaskKind kind, MultiL Kind = kind; } - /// Gets or sets the analysis input. + /// Contains the input documents. public MultiLanguageAnalysisInput AnalysisInput { get; set; } - /// Supported parameters for a PII Entities Recognition task. + /// Pii task parameters. public PiiTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextSentimentAnalysisInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextSentimentAnalysisInput.cs index 7e6748a86667..ff57e2ba2077 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextSentimentAnalysisInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextSentimentAnalysisInput.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The AnalyzeTextSentimentAnalysisInput. + /// Contains the analyze text SentimentAnalysis task input. internal partial class AnalyzeTextSentimentAnalysisInput : AnalyzeTextTask { /// Initializes a new instance of . @@ -17,9 +17,9 @@ public AnalyzeTextSentimentAnalysisInput() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. - /// - /// Supported parameters for a Sentiment Analysis task. + /// The kind of task to perform. + /// Contains the input documents. + /// Sentiment Analysis task parameters. internal AnalyzeTextSentimentAnalysisInput(AnalyzeTextTaskKind kind, MultiLanguageAnalysisInput analysisInput, SentimentAnalysisTaskParameters parameters) : base(kind) { AnalysisInput = analysisInput; @@ -27,9 +27,9 @@ internal AnalyzeTextSentimentAnalysisInput(AnalyzeTextTaskKind kind, MultiLangua Kind = kind; } - /// Gets or sets the analysis input. + /// Contains the input documents. public MultiLanguageAnalysisInput AnalysisInput { get; set; } - /// Supported parameters for a Sentiment Analysis task. + /// Sentiment Analysis task parameters. public SentimentAnalysisTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTask.cs index 8e42d2693178..f1c814675e96 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTask.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// - /// The AnalyzeTextTask. + /// Collection of documents to analyze and a single task to execute. /// 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 . /// @@ -20,13 +20,13 @@ public AnalyzeTextTask() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis tasks. + /// The kind of task to perform. internal AnalyzeTextTask(AnalyzeTextTaskKind kind) { Kind = kind; } - /// Enumeration of supported Text Analysis tasks. + /// The kind of task to perform. internal AnalyzeTextTaskKind Kind { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskKind.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskKind.cs index 43db54d0b992..ca1c5d6392fb 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskKind.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskKind.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// Enumeration of supported Text Analysis tasks. + /// The kind of the analyze-text tasks supported. internal readonly partial struct AnalyzeTextTaskKind : IEquatable { private readonly string _value; @@ -29,17 +29,17 @@ public AnalyzeTextTaskKind(string value) private const string LanguageDetectionValue = "LanguageDetection"; private const string EntityLinkingValue = "EntityLinking"; - /// SentimentAnalysis. + /// Sentiment analysis task. public static AnalyzeTextTaskKind SentimentAnalysis { get; } = new AnalyzeTextTaskKind(SentimentAnalysisValue); - /// EntityRecognition. + /// Entity recognition task. public static AnalyzeTextTaskKind EntityRecognition { get; } = new AnalyzeTextTaskKind(EntityRecognitionValue); - /// PiiEntityRecognition. + /// PII entity recognition task. public static AnalyzeTextTaskKind PiiEntityRecognition { get; } = new AnalyzeTextTaskKind(PiiEntityRecognitionValue); - /// KeyPhraseExtraction. + /// Key phrase extraction task. public static AnalyzeTextTaskKind KeyPhraseExtraction { get; } = new AnalyzeTextTaskKind(KeyPhraseExtractionValue); - /// LanguageDetection. + /// Language detection task. public static AnalyzeTextTaskKind LanguageDetection { get; } = new AnalyzeTextTaskKind(LanguageDetectionValue); - /// EntityLinking. + /// Entity linking task. public static AnalyzeTextTaskKind EntityLinking { get; } = new AnalyzeTextTaskKind(EntityLinkingValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextTaskKind left, AnalyzeTextTaskKind right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResult.cs index 57e6017ac79f..95e4c82205c0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResult.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// - /// The AnalyzeTextTaskResult. + /// The result object for the analyze task. /// 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 . /// @@ -20,13 +20,13 @@ internal AnalyzeTextTaskResult() } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. + /// The kind of task result. internal AnalyzeTextTaskResult(AnalyzeTextTaskResultsKind kind) { Kind = kind; } - /// Enumeration of supported Text Analysis task results. + /// The kind of task result. internal AnalyzeTextTaskResultsKind Kind { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResultsKind.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResultsKind.cs index 5ce829a83773..1bf6a0b45253 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResultsKind.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTextTaskResultsKind.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// Enumeration of supported Text Analysis task results. + /// The kind of the response object returned by the analyze-text task. internal readonly partial struct AnalyzeTextTaskResultsKind : IEquatable { private readonly string _value; @@ -29,17 +29,17 @@ public AnalyzeTextTaskResultsKind(string value) private const string LanguageDetectionResultsValue = "LanguageDetectionResults"; private const string EntityLinkingResultsValue = "EntityLinkingResults"; - /// SentimentAnalysisResults. + /// Sentiment analysis results. public static AnalyzeTextTaskResultsKind SentimentAnalysisResults { get; } = new AnalyzeTextTaskResultsKind(SentimentAnalysisResultsValue); - /// EntityRecognitionResults. + /// Entity recognition results. public static AnalyzeTextTaskResultsKind EntityRecognitionResults { get; } = new AnalyzeTextTaskResultsKind(EntityRecognitionResultsValue); - /// PiiEntityRecognitionResults. + /// PII entity recognition results. public static AnalyzeTextTaskResultsKind PiiEntityRecognitionResults { get; } = new AnalyzeTextTaskResultsKind(PiiEntityRecognitionResultsValue); - /// KeyPhraseExtractionResults. + /// Key phrase extraction results. public static AnalyzeTextTaskResultsKind KeyPhraseExtractionResults { get; } = new AnalyzeTextTaskResultsKind(KeyPhraseExtractionResultsValue); - /// LanguageDetectionResults. + /// Language detection results. public static AnalyzeTextTaskResultsKind LanguageDetectionResults { get; } = new AnalyzeTextTaskResultsKind(LanguageDetectionResultsValue); - /// EntityLinkingResults. + /// Entity linking results. public static AnalyzeTextTaskResultsKind EntityLinkingResults { get; } = new AnalyzeTextTaskResultsKind(EntityLinkingResultsValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextTaskResultsKind left, AnalyzeTextTaskResultsKind right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.Serialization.cs index 8e077790f9fe..f6b52192e1e0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class ClassificationDocumentResult : IUtf8JsonSerializable + internal partial class ClassificationDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("class"u8); - writer.WriteStartArray(); - foreach (var item in Class) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static ClassificationDocumentResult DeserializeClassificationDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList @class = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList @class = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("class"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ClassificationResult.DeserializeClassificationResult(item)); - } - @class = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -86,24 +48,26 @@ internal static ClassificationDocumentResult DeserializeClassificationDocumentRe statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("class"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClassificationResult.DeserializeClassificationResult(item)); + } + @class = array; + continue; + } } return new ClassificationDocumentResult(id, warnings, statistics, @class); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ClassificationDocumentResult FromResponse(Response response) + internal static ClassificationDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeClassificationDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.cs index 1678bd2cfc09..d97a10e8541a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationDocumentResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The ClassificationDocumentResult. - internal partial class ClassificationDocumentResult : DocumentResult + /// Contains the classification doc result for the task. + internal partial class ClassificationDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. - /// + /// Contains the classification doc results for all docs. /// , or is null. - public ClassificationDocumentResult(string id, IEnumerable warnings, IEnumerable @class) : base(id, warnings) + internal ClassificationDocumentResult(string id, IEnumerable warnings, IEnumerable @class) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(@class, nameof(@class)); + Id = id; + Warnings = warnings.ToList(); Class = @class.ToList(); } @@ -32,13 +34,22 @@ public ClassificationDocumentResult(string id, IEnumerable warn /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// - internal ClassificationDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList @class) : base(id, warnings, statistics) + /// Contains the classification doc results for all docs. + internal ClassificationDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList @class) { + Id = id; + Warnings = warnings; + Statistics = statistics; Class = @class; } - /// Gets the class. - public IList Class { get; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } + /// Contains the classification doc results for all docs. + public IReadOnlyList Class { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.Serialization.cs index 887396cf4ffd..afa7d5a21e91 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class ClassificationResult : IUtf8JsonSerializable + internal partial class ClassificationResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category); - writer.WritePropertyName("confidenceScore"u8); - writer.WriteNumberValue(ConfidenceScore); - writer.WriteEndObject(); - } - internal static ClassificationResult DeserializeClassificationResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -53,13 +42,5 @@ internal static ClassificationResult FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeClassificationResult(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.cs index b5a2e06b412d..4146061ccfb0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ClassificationResult.cs @@ -9,14 +9,14 @@ namespace Azure.AI.TextAnalytics.Models { - /// The ClassificationResult. + /// Contains the classification result. internal partial class ClassificationResult { /// Initializes a new instance of . /// Classification type. /// Confidence score between 0 and 1 of the recognized class. /// is null. - public ClassificationResult(string category, double confidenceScore) + internal ClassificationResult(string category, double confidenceScore) { Argument.AssertNotNull(category, nameof(category)); @@ -25,8 +25,8 @@ public ClassificationResult(string category, double confidenceScore) } /// Classification type. - public string Category { get; set; } + public string Category { get; } /// Confidence score between 0 and 1 of the recognized class. - public double ConfidenceScore { get; set; } + public double ConfidenceScore { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.Serialization.cs index 9b0ce67417b8..03b12b16e234 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static CustomEntitiesLROTask DeserializeCustomEntitiesLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomEntitiesTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = CustomEntitiesTaskParameters.DeserializeCustomEntitiesTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new CustomEntitiesLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomEntitiesLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomEntitiesLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.cs index d73f078a2417..1810f3396d58 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesLROTask.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// Use custom models to ease the process of information extraction from unstructured documents like contracts or financial documents. + /// Contains the custom text LRO task. internal partial class CustomEntitiesLROTask : AnalyzeTextLROTask { /// Initializes a new instance of . @@ -17,16 +17,16 @@ public CustomEntitiesLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a Custom Entities task. + /// task name. + /// The kind of task to perform. + /// task parameters. internal CustomEntitiesLROTask(string taskName, AnalyzeTextLROTaskKind kind, CustomEntitiesTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a Custom Entities task. + /// task parameters. public CustomEntitiesTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.Serialization.cs index c04d465f9fdb..f3c06cefdebe 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.Serialization.cs @@ -7,64 +7,24 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class CustomEntitiesResult : IUtf8JsonSerializable + internal partial class CustomEntitiesResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - writer.WriteEndObject(); - } - internal static CustomEntitiesResult DeserializeCustomEntitiesResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string projectName = default; string deploymentName = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomEntitiesResultDocumentsItem.DeserializeCustomEntitiesResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -94,24 +54,26 @@ internal static CustomEntitiesResult DeserializeCustomEntitiesResult(JsonElement deploymentName = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EntitiesDocumentResult.DeserializeEntitiesDocumentResult(item)); + } + documents = array; + continue; + } } return new CustomEntitiesResult(errors, statistics, projectName, deploymentName, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomEntitiesResult FromResponse(Response response) + internal static CustomEntitiesResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeCustomEntitiesResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.cs index 15ab3b54fa0a..bb78519c545f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResult.cs @@ -11,22 +11,25 @@ namespace Azure.AI.TextAnalytics.Models { - /// The CustomEntitiesResult. - internal partial class CustomEntitiesResult : CustomResult + /// Contains the list of detected custom entities result for the documents. + internal partial class CustomEntitiesResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Response by document. + /// Enumeration of the document results. /// , , or is null. - public CustomEntitiesResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) : base(errors, projectName, deploymentName) + internal CustomEntitiesResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentName, nameof(deploymentName)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ProjectName = projectName; + DeploymentName = deploymentName; Documents = documents.ToList(); } @@ -35,13 +38,25 @@ public CustomEntitiesResult(IEnumerable errors, string projectNam /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Response by document. - internal CustomEntitiesResult(IList errors, TextDocumentBatchStatistics statistics, string projectName, string deploymentName, IList documents) : base(errors, statistics, projectName, deploymentName) + /// Enumeration of the document results. + internal CustomEntitiesResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ProjectName = projectName; + DeploymentName = deploymentName; Documents = documents; } - /// Response by document. - public IList Documents { get; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates the project name for the model. + public string ProjectName { get; } + /// This field indicates the deployment name for the model. + public string DeploymentName { get; } + /// Enumeration of the document results. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResultDocumentsItem.Serialization.cs deleted file mode 100644 index 7c60eff8c1ec..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class CustomEntitiesResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static CustomEntitiesResultDocumentsItem DeserializeCustomEntitiesResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList entities = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Entity.DeserializeEntity(item)); - } - entities = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new CustomEntitiesResultDocumentsItem(id, warnings, statistics, entities); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomEntitiesResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomEntitiesResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResultDocumentsItem.cs deleted file mode 100644 index 1f7ee1e77323..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesResultDocumentsItem.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The CustomEntitiesResultDocumentsItem. - internal partial class CustomEntitiesResultDocumentsItem : EntitiesDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Recognized entities in the document. - /// , or is null. - public CustomEntitiesResultDocumentsItem(string id, IEnumerable warnings, IEnumerable entities) : base(id, warnings, entities) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(entities, nameof(entities)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Recognized entities in the document. - internal CustomEntitiesResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList entities) : base(id, warnings, statistics, entities) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.Serialization.cs index 40777b221ac6..60458c2c9dda 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.Serialization.cs @@ -15,77 +15,25 @@ internal partial class CustomEntitiesTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(StringIndexType)) + if (Optional.IsDefined(LoggingOptOut)) { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); } writer.WritePropertyName("projectName"u8); writer.WriteStringValue(ProjectName); writer.WritePropertyName("deploymentName"u8); writer.WriteStringValue(DeploymentName); - if (Optional.IsDefined(LoggingOptOut)) + if (Optional.IsDefined(StringIndexType)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.Value.ToString()); } writer.WriteEndObject(); } - internal static CustomEntitiesTaskParameters DeserializeCustomEntitiesTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StringIndexType? stringIndexType = default; - string projectName = default; - string deploymentName = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new CustomEntitiesTaskParameters(loggingOptOut, projectName, deploymentName, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomEntitiesTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomEntitiesTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.cs index 3a0ec5b6f939..d62acc282801 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntitiesTaskParameters.cs @@ -10,29 +10,41 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Custom Entities task. - internal partial class CustomEntitiesTaskParameters : CustomTaskParameters + internal partial class CustomEntitiesTaskParameters { /// Initializes a new instance of . /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// or is null. - public CustomEntitiesTaskParameters(string projectName, string deploymentName) : base(projectName, deploymentName) + public CustomEntitiesTaskParameters(string projectName, string deploymentName) { Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + ProjectName = projectName; + DeploymentName = deploymentName; } /// Initializes a new instance of . - /// + /// logging opt out. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal CustomEntitiesTaskParameters(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType) : base(loggingOptOut, projectName, deploymentName) + /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). + internal CustomEntitiesTaskParameters(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ProjectName = projectName; + DeploymentName = deploymentName; StringIndexType = stringIndexType; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// This field indicates the project name for the model. + public string ProjectName { get; } + /// This field indicates the deployment name for the model. + public string DeploymentName { get; } + /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.Serialization.cs index 76b88c03a180..4d2474f8c796 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class CustomEntityRecognitionLROResult : IUtf8JsonSerializable + internal partial class CustomEntityRecognitionLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static CustomEntityRecognitionLROResult DeserializeCustomEntityRecognitionLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static CustomEntityRecognitionLROResult DeserializeCustomEntityRecognit return null; } CustomEntitiesResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static CustomEntityRecognitionLROResult DeserializeCustomEntityRecognit results = CustomEntitiesResult.DeserializeCustomEntitiesResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new CustomEntityRecognitionLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new CustomEntityRecognitionLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static CustomEntityRecognitionLROResult DeserializeCustomEntityRecognit using var document = JsonDocument.Parse(response.Content); return DeserializeCustomEntityRecognitionLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.cs index 20e2905df3c9..141052d365b4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomEntityRecognitionLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The CustomEntityRecognitionLROResult. + /// Contains the custom entity recognition job result. internal partial class CustomEntityRecognitionLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// List of results. /// is null. - public CustomEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, CustomEntitiesResult results) : base(lastUpdateDateTime, status) + internal CustomEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, CustomEntitiesResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public CustomEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextA } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal CustomEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, CustomEntitiesResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// List of results. + internal CustomEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, CustomEntitiesResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public CustomEntitiesResult Results { get; set; } + /// List of results. + public CustomEntitiesResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.Serialization.cs index ab31af97a514..b2f9b0ced541 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.Serialization.cs @@ -7,64 +7,24 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class CustomLabelClassificationResult : IUtf8JsonSerializable + internal partial class CustomLabelClassificationResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - writer.WriteEndObject(); - } - internal static CustomLabelClassificationResult DeserializeCustomLabelClassificationResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string projectName = default; string deploymentName = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomLabelClassificationResultDocumentsItem.DeserializeCustomLabelClassificationResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -94,24 +54,26 @@ internal static CustomLabelClassificationResult DeserializeCustomLabelClassifica deploymentName = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClassificationDocumentResult.DeserializeClassificationDocumentResult(item)); + } + documents = array; + continue; + } } return new CustomLabelClassificationResult(errors, statistics, projectName, deploymentName, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomLabelClassificationResult FromResponse(Response response) + internal static CustomLabelClassificationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeCustomLabelClassificationResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.cs index bfdacca2e077..2c49360ac640 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.TextAnalytics.Models { - /// The CustomLabelClassificationResult. - internal partial class CustomLabelClassificationResult : CustomResult + /// Contains the custom label classification results. + internal partial class CustomLabelClassificationResult { /// Initializes a new instance of . /// Errors by document id. @@ -20,13 +20,16 @@ internal partial class CustomLabelClassificationResult : CustomResult /// This field indicates the deployment name for the model. /// Response by document. /// , , or is null. - public CustomLabelClassificationResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) : base(errors, projectName, deploymentName) + internal CustomLabelClassificationResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentName, nameof(deploymentName)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ProjectName = projectName; + DeploymentName = deploymentName; Documents = documents.ToList(); } @@ -36,12 +39,24 @@ public CustomLabelClassificationResult(IEnumerable errors, string /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. - internal CustomLabelClassificationResult(IList errors, TextDocumentBatchStatistics statistics, string projectName, string deploymentName, IList documents) : base(errors, statistics, projectName, deploymentName) + internal CustomLabelClassificationResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ProjectName = projectName; + DeploymentName = deploymentName; Documents = documents; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates the project name for the model. + public string ProjectName { get; } + /// This field indicates the deployment name for the model. + public string DeploymentName { get; } /// Response by document. - public IList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResultDocumentsItem.Serialization.cs deleted file mode 100644 index 3264b5bd572a..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class CustomLabelClassificationResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("class"u8); - writer.WriteStartArray(); - foreach (var item in Class) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static CustomLabelClassificationResultDocumentsItem DeserializeCustomLabelClassificationResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList @class = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("class"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ClassificationResult.DeserializeClassificationResult(item)); - } - @class = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new CustomLabelClassificationResultDocumentsItem(id, warnings, statistics, @class); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomLabelClassificationResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomLabelClassificationResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResultDocumentsItem.cs deleted file mode 100644 index d6e4dba54305..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomLabelClassificationResultDocumentsItem.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The CustomLabelClassificationResultDocumentsItem. - internal partial class CustomLabelClassificationResultDocumentsItem : ClassificationDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// - /// , or is null. - public CustomLabelClassificationResultDocumentsItem(string id, IEnumerable warnings, IEnumerable @class) : base(id, warnings, @class) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(@class, nameof(@class)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// - internal CustomLabelClassificationResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList @class) : base(id, warnings, statistics, @class) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.Serialization.cs index 3a230bf197fd..82fa022a91bc 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class CustomMultiLabelClassificationLROResult : IUtf8JsonSerializable + internal partial class CustomMultiLabelClassificationLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static CustomMultiLabelClassificationLROResult DeserializeCustomMultiLabelClassificationLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static CustomMultiLabelClassificationLROResult DeserializeCustomMultiLa return null; } CustomLabelClassificationResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static CustomMultiLabelClassificationLROResult DeserializeCustomMultiLa results = CustomLabelClassificationResult.DeserializeCustomLabelClassificationResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new CustomMultiLabelClassificationLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new CustomMultiLabelClassificationLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static CustomMultiLabelClassificationLROResult DeserializeCustomMultiLa using var document = JsonDocument.Parse(response.Content); return DeserializeCustomMultiLabelClassificationLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.cs index 82bb78d8afb7..1ed6d8e6739f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The CustomMultiLabelClassificationLROResult. + /// Contains the custom multi label classification job result. internal partial class CustomMultiLabelClassificationLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// List of results. /// is null. - public CustomMultiLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) + internal CustomMultiLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public CustomMultiLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal CustomMultiLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// List of results. + internal CustomMultiLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public CustomLabelClassificationResult Results { get; set; } + /// List of results. + public CustomLabelClassificationResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.Serialization.cs index bc605fd22f8a..5f2483051590 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static CustomMultiLabelClassificationLROTask DeserializeCustomMultiLabelClassificationLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomMultiLabelClassificationTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = CustomMultiLabelClassificationTaskParameters.DeserializeCustomMultiLabelClassificationTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new CustomMultiLabelClassificationLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomMultiLabelClassificationLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomMultiLabelClassificationLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.cs index 2e7299ab1eb1..13bfe4043af5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationLROTask.cs @@ -17,16 +17,16 @@ public CustomMultiLabelClassificationLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a Custom Multi Classification task. + /// task name. + /// The kind of task to perform. + /// Task parameters. internal CustomMultiLabelClassificationLROTask(string taskName, AnalyzeTextLROTaskKind kind, CustomMultiLabelClassificationTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a Custom Multi Classification task. + /// Task parameters. public CustomMultiLabelClassificationTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.Serialization.cs index 6a086149be67..21f4aff09933 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.Serialization.cs @@ -15,62 +15,20 @@ internal partial class CustomMultiLabelClassificationTaskParameters : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); writer.WriteBooleanValue(LoggingOptOut.Value); } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); writer.WriteEndObject(); } - internal static CustomMultiLabelClassificationTaskParameters DeserializeCustomMultiLabelClassificationTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string projectName = default; - string deploymentName = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new CustomMultiLabelClassificationTaskParameters(loggingOptOut, projectName, deploymentName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomMultiLabelClassificationTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomMultiLabelClassificationTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.cs index 8448c6711b87..aa140b75ddb0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomMultiLabelClassificationTaskParameters.cs @@ -10,24 +10,37 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Custom Multi Classification task. - internal partial class CustomMultiLabelClassificationTaskParameters : CustomTaskParameters + internal partial class CustomMultiLabelClassificationTaskParameters { /// Initializes a new instance of . /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// or is null. - public CustomMultiLabelClassificationTaskParameters(string projectName, string deploymentName) : base(projectName, deploymentName) + public CustomMultiLabelClassificationTaskParameters(string projectName, string deploymentName) { Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + ProjectName = projectName; + DeploymentName = deploymentName; } /// Initializes a new instance of . - /// + /// logging opt out. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - internal CustomMultiLabelClassificationTaskParameters(bool? loggingOptOut, string projectName, string deploymentName) : base(loggingOptOut, projectName, deploymentName) + internal CustomMultiLabelClassificationTaskParameters(bool? loggingOptOut, string projectName, string deploymentName) { + LoggingOptOut = loggingOptOut; + ProjectName = projectName; + DeploymentName = deploymentName; } + + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// This field indicates the project name for the model. + public string ProjectName { get; } + /// This field indicates the deployment name for the model. + public string DeploymentName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomResult.Serialization.cs deleted file mode 100644 index 4eae7cf20593..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomResult.Serialization.cs +++ /dev/null @@ -1,99 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class CustomResult : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - writer.WriteEndObject(); - } - - internal static CustomResult DeserializeCustomResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList errors = default; - TextDocumentBatchStatistics statistics = default; - string projectName = default; - string deploymentName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("errors"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentError.DeserializeDocumentError(item)); - } - errors = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentBatchStatistics.DeserializeTextDocumentBatchStatistics(property.Value); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - } - return new CustomResult(errors, statistics, projectName, deploymentName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomResult.cs deleted file mode 100644 index bcdc468a4039..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomResult.cs +++ /dev/null @@ -1,55 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - /// The CustomResult. - internal partial class CustomResult - { - /// Initializes a new instance of . - /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// , or is null. - public CustomResult(IEnumerable errors, string projectName, string deploymentName) - { - Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - internal CustomResult(IList errors, TextDocumentBatchStatistics statistics, string projectName, string deploymentName) - { - Errors = errors; - Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Errors by document id. - public IList Errors { get; } - /// if showStats=true was specified in the request this field will contain information about the request payload. - public TextDocumentBatchStatistics Statistics { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; set; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.Serialization.cs index 416a259e924a..1d2d28c23738 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class CustomSingleLabelClassificationLROResult : IUtf8JsonSerializable + internal partial class CustomSingleLabelClassificationLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static CustomSingleLabelClassificationLROResult DeserializeCustomSingleLabelClassificationLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static CustomSingleLabelClassificationLROResult DeserializeCustomSingle return null; } CustomLabelClassificationResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static CustomSingleLabelClassificationLROResult DeserializeCustomSingle results = CustomLabelClassificationResult.DeserializeCustomLabelClassificationResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new CustomSingleLabelClassificationLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new CustomSingleLabelClassificationLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static CustomSingleLabelClassificationLROResult DeserializeCustomSingle using var document = JsonDocument.Parse(response.Content); return DeserializeCustomSingleLabelClassificationLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.cs index cda6ff4c5749..ed3c064d05e1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The CustomSingleLabelClassificationLROResult. + /// Contains the custom single label classification job result. internal partial class CustomSingleLabelClassificationLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// List of results. /// is null. - public CustomSingleLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) + internal CustomSingleLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public CustomSingleLabelClassificationLROResult(DateTimeOffset lastUpdateDateTim } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal CustomSingleLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// List of results. + internal CustomSingleLabelClassificationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public CustomLabelClassificationResult Results { get; set; } + /// List of results. + public CustomLabelClassificationResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.Serialization.cs index 5851ddde45b8..ae6a9f9494f6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static CustomSingleLabelClassificationLROTask DeserializeCustomSingleLabelClassificationLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomSingleLabelClassificationTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = CustomSingleLabelClassificationTaskParameters.DeserializeCustomSingleLabelClassificationTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new CustomSingleLabelClassificationLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomSingleLabelClassificationLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSingleLabelClassificationLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.cs index 0a833c789cfd..ffbe5846ef39 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationLROTask.cs @@ -17,16 +17,16 @@ public CustomSingleLabelClassificationLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a Custom Single Classification task. + /// task name. + /// The kind of task to perform. + /// Task parameters. internal CustomSingleLabelClassificationLROTask(string taskName, AnalyzeTextLROTaskKind kind, CustomSingleLabelClassificationTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a Custom Single Classification task. + /// Task parameters. public CustomSingleLabelClassificationTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.Serialization.cs index cdf62c6e4787..fe5cce2737f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.Serialization.cs @@ -15,62 +15,20 @@ internal partial class CustomSingleLabelClassificationTaskParameters : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); writer.WriteBooleanValue(LoggingOptOut.Value); } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); writer.WriteEndObject(); } - internal static CustomSingleLabelClassificationTaskParameters DeserializeCustomSingleLabelClassificationTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string projectName = default; - string deploymentName = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new CustomSingleLabelClassificationTaskParameters(loggingOptOut, projectName, deploymentName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomSingleLabelClassificationTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSingleLabelClassificationTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.cs index 5ad3caa9b5e1..60a1b50c5008 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomSingleLabelClassificationTaskParameters.cs @@ -10,24 +10,37 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Custom Single Classification task. - internal partial class CustomSingleLabelClassificationTaskParameters : CustomTaskParameters + internal partial class CustomSingleLabelClassificationTaskParameters { /// Initializes a new instance of . /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// or is null. - public CustomSingleLabelClassificationTaskParameters(string projectName, string deploymentName) : base(projectName, deploymentName) + public CustomSingleLabelClassificationTaskParameters(string projectName, string deploymentName) { Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + ProjectName = projectName; + DeploymentName = deploymentName; } /// Initializes a new instance of . - /// + /// logging opt out. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - internal CustomSingleLabelClassificationTaskParameters(bool? loggingOptOut, string projectName, string deploymentName) : base(loggingOptOut, projectName, deploymentName) + internal CustomSingleLabelClassificationTaskParameters(bool? loggingOptOut, string projectName, string deploymentName) { + LoggingOptOut = loggingOptOut; + ProjectName = projectName; + DeploymentName = deploymentName; } + + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// This field indicates the project name for the model. + public string ProjectName { get; } + /// This field indicates the deployment name for the model. + public string DeploymentName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomTaskParameters.Serialization.cs deleted file mode 100644 index 967295e415ce..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomTaskParameters.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class CustomTaskParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WriteEndObject(); - } - - internal static CustomTaskParameters DeserializeCustomTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string projectName = default; - string deploymentName = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new CustomTaskParameters(loggingOptOut, projectName, deploymentName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomTaskParameters(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomTaskParameters.cs deleted file mode 100644 index bc9c41960071..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/CustomTaskParameters.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.AI.TextAnalytics.Models -{ - /// Parameters object for a text analysis task using custom models. - internal partial class CustomTaskParameters : TaskParameters - { - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomTaskParameters(string projectName, string deploymentName) - { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - internal CustomTaskParameters(bool? loggingOptOut, string projectName, string deploymentName) : base(loggingOptOut) - { - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// This field indicates the project name for the model. - public string ProjectName { get; set; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.Serialization.cs index 907d468fc915..62f10a11ee8f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.Serialization.cs @@ -6,38 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial struct DetectedLanguageInternal : IUtf8JsonSerializable + internal partial struct DetectedLanguageInternal { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Name != null) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } - if (Iso6391Name != null) - { - writer.WritePropertyName("iso6391Name"u8); - writer.WriteStringValue(Iso6391Name); - } - else - { - writer.WriteNull("iso6391Name"); - } - writer.WritePropertyName("confidenceScore"u8); - writer.WriteNumberValue(ConfidenceScore); - writer.WriteEndObject(); - } - internal static DetectedLanguageInternal DeserializeDetectedLanguageInternal(JsonElement element) { string name = default; @@ -81,13 +54,5 @@ internal static DetectedLanguageInternal FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeDetectedLanguageInternal(document.RootElement); } - - /// Convert into a . - internal RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.cs index 7881fab4631f..bd39e70ea226 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DetectedLanguageInternal.cs @@ -7,14 +7,14 @@ namespace Azure.AI.TextAnalytics.Models { - /// The DetectedLanguage. + /// Contains the details of the detected language for the text. internal readonly partial struct DetectedLanguageInternal { /// Initializes a new instance of . /// Long name of a detected language (e.g. English, French). /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - public DetectedLanguageInternal(string name, string iso6391Name, double confidenceScore) + internal DetectedLanguageInternal(string name, string iso6391Name, double confidenceScore) { Name = name; Iso6391Name = iso6391Name; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.Serialization.cs index 5a8a5f890169..b236f5376c22 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class DocumentError : IUtf8JsonSerializable + internal partial class DocumentError { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error); - writer.WriteEndObject(); - } - internal static DocumentError DeserializeDocumentError(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -53,13 +42,5 @@ internal static DocumentError FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeDocumentError(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.cs index d08c02aca622..ae27fc1421b0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentError.cs @@ -16,7 +16,7 @@ internal partial class DocumentError /// The ID of the input document. /// Error encountered. /// or is null. - public DocumentError(string id, Error error) + internal DocumentError(string id, Error error) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(error, nameof(error)); @@ -26,8 +26,8 @@ public DocumentError(string id, Error error) } /// The ID of the input document. - public string Id { get; set; } + public string Id { get; } /// Error encountered. - public Error Error { get; set; } + public Error Error { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentResult.Serialization.cs deleted file mode 100644 index ab1f75b85616..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentResult.Serialization.cs +++ /dev/null @@ -1,91 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class DocumentResult : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static DocumentResult DeserializeDocumentResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new DocumentResult(id, warnings, statistics); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DocumentResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDocumentResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentResult.cs deleted file mode 100644 index f71905d52301..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentResult.cs +++ /dev/null @@ -1,48 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - /// The DocumentResult. - internal partial class DocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// or is null. - public DocumentResult(string id, IEnumerable warnings) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - - Id = id; - Warnings = warnings.ToList(); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - internal DocumentResult(string id, IList warnings, TextDocumentStatistics? statistics) - { - Id = id; - Warnings = warnings; - Statistics = statistics; - } - - /// Unique, non-empty document identifier. - public string Id { get; set; } - /// Warnings encountered while processing document. - public IList Warnings { get; } - /// if showStats=true was specified in the request this field will contain information about the document payload. - public TextDocumentStatistics? Statistics { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.Serialization.cs index 695cc18c09b8..eef9309cc49f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.Serialization.cs @@ -6,27 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class DocumentWarning : IUtf8JsonSerializable + internal partial class DocumentWarning { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToSerialString()); - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - if (Optional.IsDefined(TargetRef)) - { - writer.WritePropertyName("targetRef"u8); - writer.WriteStringValue(TargetRef); - } - writer.WriteEndObject(); - } - internal static DocumentWarning DeserializeDocumentWarning(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -64,13 +48,5 @@ internal static DocumentWarning FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeDocumentWarning(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.cs index 08ed64bfb069..46a47e245769 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/DocumentWarning.cs @@ -9,14 +9,14 @@ namespace Azure.AI.TextAnalytics.Models { - /// The DocumentWarning. + /// Contains the warnings object with warnings encountered for the processed document. internal partial class DocumentWarning { /// Initializes a new instance of . - /// Error code. + /// Warning code. /// Warning message. /// is null. - public DocumentWarning(WarningCodeValue code, string message) + internal DocumentWarning(WarningCodeValue code, string message) { Argument.AssertNotNull(message, nameof(message)); @@ -25,7 +25,7 @@ public DocumentWarning(WarningCodeValue code, string message) } /// Initializes a new instance of . - /// Error code. + /// Warning code. /// Warning message. /// A JSON pointer reference indicating the target object. internal DocumentWarning(WarningCodeValue code, string message, string targetRef) @@ -35,11 +35,11 @@ internal DocumentWarning(WarningCodeValue code, string message, string targetRef TargetRef = targetRef; } - /// Error code. - public WarningCodeValue Code { get; set; } + /// Warning code. + public WarningCodeValue Code { get; } /// Warning message. - public string Message { get; set; } + public string Message { get; } /// A JSON pointer reference indicating the target object. - public string TargetRef { get; set; } + public string TargetRef { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.Serialization.cs index 20e261b3eaf5..2553dc54bb6d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class EntitiesDocumentResult : IUtf8JsonSerializable + internal partial class EntitiesDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static EntitiesDocumentResult DeserializeEntitiesDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList entities = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList entities = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Entity.DeserializeEntity(item)); - } - entities = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -86,24 +48,26 @@ internal static EntitiesDocumentResult DeserializeEntitiesDocumentResult(JsonEle statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Entity.DeserializeEntity(item)); + } + entities = array; + continue; + } } return new EntitiesDocumentResult(id, warnings, statistics, entities); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EntitiesDocumentResult FromResponse(Response response) + internal static EntitiesDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeEntitiesDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.cs index f22a185b0dcc..fda0d735c6f9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesDocumentResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntitiesDocumentResult. - internal partial class EntitiesDocumentResult : DocumentResult + /// Contains the entity recognition task result for the document. + internal partial class EntitiesDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// Recognized entities in the document. /// , or is null. - public EntitiesDocumentResult(string id, IEnumerable warnings, IEnumerable entities) : base(id, warnings) + internal EntitiesDocumentResult(string id, IEnumerable warnings, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(entities, nameof(entities)); + Id = id; + Warnings = warnings.ToList(); Entities = entities.ToList(); } @@ -33,12 +35,21 @@ public EntitiesDocumentResult(string id, IEnumerable warnings, /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Recognized entities in the document. - internal EntitiesDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList entities) : base(id, warnings, statistics) + internal EntitiesDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList entities) { + Id = id; + Warnings = warnings; + Statistics = statistics; Entities = entities; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// Recognized entities in the document. - public IList Entities { get; } + public IReadOnlyList Entities { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.Serialization.cs index b1f9460e1b15..d9c5f18d07a6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static EntitiesLROTask DeserializeEntitiesLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EntitiesTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = EntitiesTaskParameters.DeserializeEntitiesTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new EntitiesLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new EntitiesLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEntitiesLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.cs index d76d674c8b45..e3586da5e418 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesLROTask.cs @@ -17,16 +17,16 @@ public EntitiesLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for an Entity Recognition task. + /// task name. + /// The kind of task to perform. + /// Task parameters. internal EntitiesLROTask(string taskName, AnalyzeTextLROTaskKind kind, EntitiesTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for an Entity Recognition task. + /// Task parameters. public EntitiesTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.Serialization.cs index c523cbe7254c..933fa9ca4956 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class EntitiesResult : IUtf8JsonSerializable + internal partial class EntitiesResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static EntitiesResult DeserializeEntitiesResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EntitiesResultDocumentsItem.DeserializeEntitiesResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static EntitiesResult DeserializeEntitiesResult(JsonElement element) modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EntitiesDocumentResult.DeserializeEntitiesDocumentResult(item)); + } + documents = array; + continue; + } } return new EntitiesResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EntitiesResult FromResponse(Response response) + internal static EntitiesResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeEntitiesResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.cs index 04e60c035971..79f802f2225e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntitiesResult. - internal partial class EntitiesResult : PreBuiltResult + /// Contains the entity recognition task result. + internal partial class EntitiesResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - public EntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal EntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -33,12 +35,21 @@ public EntitiesResult(IEnumerable errors, string modelVersion, IE /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - internal EntitiesResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + internal EntitiesResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } /// Response by document. - public IList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResultDocumentsItem.Serialization.cs deleted file mode 100644 index 0364b8511622..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class EntitiesResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static EntitiesResultDocumentsItem DeserializeEntitiesResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList entities = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Entity.DeserializeEntity(item)); - } - entities = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new EntitiesResultDocumentsItem(id, warnings, statistics, entities); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new EntitiesResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEntitiesResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResultDocumentsItem.cs deleted file mode 100644 index b279a33ced9e..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesResultDocumentsItem.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The EntitiesResultDocumentsItem. - internal partial class EntitiesResultDocumentsItem : EntitiesDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Recognized entities in the document. - /// , or is null. - public EntitiesResultDocumentsItem(string id, IEnumerable warnings, IEnumerable entities) : base(id, warnings, entities) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(entities, nameof(entities)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Recognized entities in the document. - internal EntitiesResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList entities) : base(id, warnings, statistics, entities) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.Serialization.cs index 8fe20d837dd5..6ce2677b229e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.Serialization.cs @@ -15,72 +15,26 @@ internal partial class EntitiesTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(StringIndexType)) + if (Optional.IsDefined(LoggingOptOut)) { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); } if (Optional.IsDefined(ModelVersion)) { writer.WritePropertyName("modelVersion"u8); writer.WriteStringValue(ModelVersion); } - if (Optional.IsDefined(LoggingOptOut)) + if (Optional.IsDefined(StringIndexType)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.Value.ToString()); } writer.WriteEndObject(); } - internal static EntitiesTaskParameters DeserializeEntitiesTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StringIndexType? stringIndexType = default; - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new EntitiesTaskParameters(loggingOptOut, modelVersion, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new EntitiesTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEntitiesTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.cs index 2a40db9313b7..bfbf737cfaf4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for an Entity Recognition task. - internal partial class EntitiesTaskParameters : PreBuiltTaskParameters + internal partial class EntitiesTaskParameters { /// Initializes a new instance of . public EntitiesTaskParameters() @@ -16,15 +16,21 @@ public EntitiesTaskParameters() } /// Initializes a new instance of . - /// - /// - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal EntitiesTaskParameters(bool? loggingOptOut, string modelVersion, StringIndexType? stringIndexType) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + /// (Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). + internal EntitiesTaskParameters(bool? loggingOptOut, string modelVersion, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; StringIndexType = stringIndexType; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// (Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskResult.cs index 7b3990233069..f331420d8fd1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskResult.cs @@ -9,11 +9,11 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntitiesTaskResult. + /// Contains the entity task. internal partial class EntitiesTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// + /// Results for entity recognition. /// is null. internal EntitiesTaskResult(EntitiesResult results) { @@ -24,15 +24,15 @@ internal EntitiesTaskResult(EntitiesResult results) } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. - /// + /// The kind of task result. + /// Results for entity recognition. internal EntitiesTaskResult(AnalyzeTextTaskResultsKind kind, EntitiesResult results) : base(kind) { Results = results; Kind = kind; } - /// Gets the results. + /// Results for entity recognition. public EntitiesResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.Serialization.cs index 54dd5f7dd658..7a48d12a66f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.Serialization.cs @@ -6,33 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class Entity : IUtf8JsonSerializable + internal partial class Entity { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category); - if (Optional.IsDefined(Subcategory)) - { - writer.WritePropertyName("subcategory"u8); - writer.WriteStringValue(Subcategory); - } - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WritePropertyName("confidenceScore"u8); - writer.WriteNumberValue(ConfidenceScore); - writer.WriteEndObject(); - } - internal static Entity DeserializeEntity(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -94,13 +72,5 @@ internal static Entity FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeEntity(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.cs index 57b530540792..efab17afcaa4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Entity.cs @@ -9,7 +9,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The Entity. + /// Defines the detected entity object containing the entity category and entity text detected, etc. internal partial class Entity { /// Initializes a new instance of . @@ -19,7 +19,7 @@ internal partial class Entity /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. /// or is null. - public Entity(string text, string category, int offset, int length, double confidenceScore) + internal Entity(string text, string category, int offset, int length, double confidenceScore) { Argument.AssertNotNull(text, nameof(text)); Argument.AssertNotNull(category, nameof(category)); @@ -49,16 +49,16 @@ internal Entity(string text, string category, string subcategory, int offset, in } /// Entity text as appears in the request. - public string Text { get; set; } + public string Text { get; } /// Entity type. - public string Category { get; set; } + public string Category { get; } /// (Optional) Entity sub type. - public string Subcategory { get; set; } + public string Subcategory { get; } /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - public int Offset { get; set; } + public int Offset { get; } /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - public int Length { get; set; } + public int Length { get; } /// Confidence score between 0 and 1 of the extracted entity. - public double ConfidenceScore { get; set; } + public double ConfidenceScore { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.Serialization.cs index 61c98f1e2c11..0a2b4176b132 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics { - public partial class EntityDataSource : IUtf8JsonSerializable + public partial class EntityDataSource { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("dataSource"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(EntityId); - writer.WriteEndObject(); - } - internal static EntityDataSource DeserializeEntityDataSource(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -53,13 +42,5 @@ internal static EntityDataSource FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeEntityDataSource(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.cs index 01ea47935077..03fed56c0d35 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityDataSource.cs @@ -9,7 +9,7 @@ namespace Azure.AI.TextAnalytics { - /// The HealthcareEntityLink. + /// Reference to an entity in known data sources. public partial class EntityDataSource { } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.Serialization.cs index b52dbbb5059b..dbc56b69e16c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class EntityLinkingLROResult : IUtf8JsonSerializable + internal partial class EntityLinkingLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static EntityLinkingLROResult DeserializeEntityLinkingLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static EntityLinkingLROResult DeserializeEntityLinkingLROResult(JsonEle return null; } EntityLinkingResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static EntityLinkingLROResult DeserializeEntityLinkingLROResult(JsonEle results = EntityLinkingResult.DeserializeEntityLinkingResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new EntityLinkingLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new EntityLinkingLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static EntityLinkingLROResult DeserializeEntityLinkingLROResult(JsonEle using var document = JsonDocument.Parse(response.Content); return DeserializeEntityLinkingLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.cs index fe0291a36ae2..917500169bb5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntityLinkingLROResult. + /// Contains the analyze text Entity linking task LRO result. internal partial class EntityLinkingLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Entity linking result. /// is null. - public EntityLinkingLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, EntityLinkingResult results) : base(lastUpdateDateTime, status) + internal EntityLinkingLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, EntityLinkingResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public EntityLinkingLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOp } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal EntityLinkingLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, EntityLinkingResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Entity linking result. + internal EntityLinkingLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, EntityLinkingResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public EntityLinkingResult Results { get; set; } + /// Entity linking result. + public EntityLinkingResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.Serialization.cs index 91fbd76296fc..2ee758a4997b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static EntityLinkingLROTask DeserializeEntityLinkingLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EntityLinkingTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = EntityLinkingTaskParameters.DeserializeEntityLinkingTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new EntityLinkingLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new EntityLinkingLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEntityLinkingLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.cs index 434d46ac8275..a9808e6b57b8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingLROTask.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// An object representing the task definition for an Entity Linking task. + /// Contains the analyze text Entity linking LRO task. internal partial class EntityLinkingLROTask : AnalyzeTextLROTask { /// Initializes a new instance of . @@ -17,16 +17,16 @@ public EntityLinkingLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for an Entity Linking task. + /// task name. + /// The kind of task to perform. + /// Task parameters. internal EntityLinkingLROTask(string taskName, AnalyzeTextLROTaskKind kind, EntityLinkingTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for an Entity Linking task. + /// Task parameters. public EntityLinkingTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.Serialization.cs index 1f97f705ab8b..2ef5806de4d6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class EntityLinkingResult : IUtf8JsonSerializable + internal partial class EntityLinkingResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static EntityLinkingResult DeserializeEntityLinkingResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EntityLinkingResultDocumentsItem.DeserializeEntityLinkingResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static EntityLinkingResult DeserializeEntityLinkingResult(JsonElement e modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LinkedEntitiesDocumentResult.DeserializeLinkedEntitiesDocumentResult(item)); + } + documents = array; + continue; + } } return new EntityLinkingResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new EntityLinkingResult FromResponse(Response response) + internal static EntityLinkingResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeEntityLinkingResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.cs index a48c7a1d0590..112231249fd9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntityLinkingResult. - internal partial class EntityLinkingResult : PreBuiltResult + /// Entity linking result. + internal partial class EntityLinkingResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - public EntityLinkingResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal EntityLinkingResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -33,12 +35,21 @@ public EntityLinkingResult(IEnumerable errors, string modelVersio /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - internal EntityLinkingResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + internal EntityLinkingResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } /// Response by document. - public IList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResultDocumentsItem.Serialization.cs deleted file mode 100644 index 5552a3afd3e8..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class EntityLinkingResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static EntityLinkingResultDocumentsItem DeserializeEntityLinkingResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList entities = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LinkedEntity.DeserializeLinkedEntity(item)); - } - entities = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new EntityLinkingResultDocumentsItem(id, warnings, statistics, entities); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new EntityLinkingResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEntityLinkingResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResultDocumentsItem.cs deleted file mode 100644 index f3967c70e2b9..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingResultDocumentsItem.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The EntityLinkingResultDocumentsItem. - internal partial class EntityLinkingResultDocumentsItem : LinkedEntitiesDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Recognized well known entities in the document. - /// , or is null. - public EntityLinkingResultDocumentsItem(string id, IEnumerable warnings, IEnumerable entities) : base(id, warnings, entities) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(entities, nameof(entities)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Recognized well known entities in the document. - internal EntityLinkingResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList entities) : base(id, warnings, statistics, entities) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.Serialization.cs index 8f75a6727544..815aa508b5d1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.Serialization.cs @@ -15,72 +15,26 @@ internal partial class EntityLinkingTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(StringIndexType)) + if (Optional.IsDefined(LoggingOptOut)) { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); } if (Optional.IsDefined(ModelVersion)) { writer.WritePropertyName("modelVersion"u8); writer.WriteStringValue(ModelVersion); } - if (Optional.IsDefined(LoggingOptOut)) + if (Optional.IsDefined(StringIndexType)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.Value.ToString()); } writer.WriteEndObject(); } - internal static EntityLinkingTaskParameters DeserializeEntityLinkingTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StringIndexType? stringIndexType = default; - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new EntityLinkingTaskParameters(loggingOptOut, modelVersion, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new EntityLinkingTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeEntityLinkingTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.cs index 630a89b0245a..f2ace0f3f80c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for an Entity Linking task. - internal partial class EntityLinkingTaskParameters : PreBuiltTaskParameters + internal partial class EntityLinkingTaskParameters { /// Initializes a new instance of . public EntityLinkingTaskParameters() @@ -16,15 +16,21 @@ public EntityLinkingTaskParameters() } /// Initializes a new instance of . - /// - /// - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal EntityLinkingTaskParameters(bool? loggingOptOut, string modelVersion, StringIndexType? stringIndexType) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). + internal EntityLinkingTaskParameters(bool? loggingOptOut, string modelVersion, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; StringIndexType = stringIndexType; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskResult.cs index 7989552ea9f5..d3fb8f6a7659 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityLinkingTaskResult.cs @@ -9,11 +9,11 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntityLinkingTaskResult. + /// Contains the analyze text Entity linking task result. internal partial class EntityLinkingTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// + /// Entity linking result. /// is null. internal EntityLinkingTaskResult(EntityLinkingResult results) { @@ -24,15 +24,15 @@ internal EntityLinkingTaskResult(EntityLinkingResult results) } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. - /// + /// The kind of task result. + /// Entity linking result. internal EntityLinkingTaskResult(AnalyzeTextTaskResultsKind kind, EntityLinkingResult results) : base(kind) { Results = results; Kind = kind; } - /// Gets the results. + /// Entity linking result. public EntityLinkingResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.Serialization.cs index 420973855c6e..85c67ac8ee83 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class EntityRecognitionLROResult : IUtf8JsonSerializable + internal partial class EntityRecognitionLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static EntityRecognitionLROResult DeserializeEntityRecognitionLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static EntityRecognitionLROResult DeserializeEntityRecognitionLROResult return null; } EntitiesResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static EntityRecognitionLROResult DeserializeEntityRecognitionLROResult results = EntitiesResult.DeserializeEntitiesResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new EntityRecognitionLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new EntityRecognitionLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static EntityRecognitionLROResult DeserializeEntityRecognitionLROResult using var document = JsonDocument.Parse(response.Content); return DeserializeEntityRecognitionLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.cs index 7e58f252e4e9..458888844a25 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntityRecognitionLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The EntityRecognitionLROResult. + /// Contains the entity recognition job task result. internal partial class EntityRecognitionLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Results for the task. /// is null. - public EntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, EntitiesResult results) : base(lastUpdateDateTime, status) + internal EntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, EntitiesResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public EntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyti } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal EntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, EntitiesResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Results for the task. + internal EntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, EntitiesResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public EntitiesResult Results { get; set; } + /// Results for the task. + public EntitiesResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.Serialization.cs index 2752ae9a1863..9718e03c6677 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.Serialization.cs @@ -7,47 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class Error : IUtf8JsonSerializable + internal partial class Error { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); - } - if (Optional.IsCollectionDefined(Details)) - { - writer.WritePropertyName("details"u8); - writer.WriteStartArray(); - foreach (var item in Details) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Innererror)) - { - writer.WritePropertyName("innererror"u8); - writer.WriteObjectValue(Innererror); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - internal static Error DeserializeError(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -57,10 +21,8 @@ internal static Error DeserializeError(JsonElement element) ErrorCode code = default; string message = default; string target = default; - IList details = default; + IReadOnlyList details = default; InnerErrorModel innererror = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("code"u8)) @@ -101,16 +63,8 @@ internal static Error DeserializeError(JsonElement element) innererror = InnerErrorModel.DeserializeInnerErrorModel(property.Value); continue; } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } - additionalProperties = additionalPropertiesDictionary; - return new Error( - code, - message, - target, - details ?? new ChangeTrackingList(), - innererror, - additionalProperties); + return new Error(code, message, target, details ?? new ChangeTrackingList(), innererror); } /// Deserializes the model from a raw response. @@ -120,13 +74,5 @@ internal static Error FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeError(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.cs index 8171965e6d24..5c7e29245e14 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Error.cs @@ -10,21 +10,20 @@ namespace Azure.AI.TextAnalytics.Models { - /// The error object. + /// The error response object returned when the service encounters some errors during processing the request. internal partial class Error { /// Initializes a new instance of . /// One of a server-defined set of error codes. /// A human-readable representation of the error. /// is null. - public Error(ErrorCode code, string message) + internal Error(ErrorCode code, string message) { Argument.AssertNotNull(message, nameof(message)); Code = code; Message = message; Details = new ChangeTrackingList(); - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -33,28 +32,24 @@ public Error(ErrorCode code, string message) /// The target of the error. /// An array of details about specific errors that led to this reported error. /// An object containing more specific information than the current object about the error. - /// Additional Properties. - internal Error(ErrorCode code, string message, string target, IList details, InnerErrorModel innererror, IDictionary additionalProperties) + internal Error(ErrorCode code, string message, string target, IReadOnlyList details, InnerErrorModel innererror) { Code = code; Message = message; Target = target; Details = details; Innererror = innererror; - AdditionalProperties = additionalProperties; } /// One of a server-defined set of error codes. - public ErrorCode Code { get; set; } + public ErrorCode Code { get; } /// A human-readable representation of the error. - public string Message { get; set; } + public string Message { get; } /// The target of the error. - public string Target { get; set; } + public string Target { get; } /// An array of details about specific errors that led to this reported error. - public IList Details { get; } + public IReadOnlyList Details { get; } /// An object containing more specific information than the current object about the error. - public InnerErrorModel Innererror { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } + public InnerErrorModel Innererror { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ErrorCode.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ErrorCode.cs index 8f638583f5d1..e827ada6884e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ErrorCode.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ErrorCode.cs @@ -41,41 +41,41 @@ public ErrorCode(string value) private const string ConflictValue = "Conflict"; private const string WarningValue = "Warning"; - /// InvalidRequest. + /// Invalid request error. public static ErrorCode InvalidRequest { get; } = new ErrorCode(InvalidRequestValue); - /// InvalidArgument. + /// Invalid argument error. public static ErrorCode InvalidArgument { get; } = new ErrorCode(InvalidArgumentValue); - /// Unauthorized. + /// Unauthorized access error. public static ErrorCode Unauthorized { get; } = new ErrorCode(UnauthorizedValue); - /// Forbidden. + /// Forbidden access error. public static ErrorCode Forbidden { get; } = new ErrorCode(ForbiddenValue); - /// NotFound. + /// Not found error. public static ErrorCode NotFound { get; } = new ErrorCode(NotFoundValue); - /// ProjectNotFound. + /// Project not found error. public static ErrorCode ProjectNotFound { get; } = new ErrorCode(ProjectNotFoundValue); - /// OperationNotFound. + /// Operation not found error. public static ErrorCode OperationNotFound { get; } = new ErrorCode(OperationNotFoundValue); - /// AzureCognitiveSearchNotFound. + /// Azure Cognitive Search not found error. public static ErrorCode AzureCognitiveSearchNotFound { get; } = new ErrorCode(AzureCognitiveSearchNotFoundValue); - /// AzureCognitiveSearchIndexNotFound. + /// Azure Cognitive Search index not found error. public static ErrorCode AzureCognitiveSearchIndexNotFound { get; } = new ErrorCode(AzureCognitiveSearchIndexNotFoundValue); - /// TooManyRequests. + /// Too many requests error. public static ErrorCode TooManyRequests { get; } = new ErrorCode(TooManyRequestsValue); - /// AzureCognitiveSearchThrottling. + /// Azure Cognitive Search throttling error. public static ErrorCode AzureCognitiveSearchThrottling { get; } = new ErrorCode(AzureCognitiveSearchThrottlingValue); - /// AzureCognitiveSearchIndexLimitReached. + /// Azure Cognitive Search index limit reached error. public static ErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new ErrorCode(AzureCognitiveSearchIndexLimitReachedValue); - /// InternalServerError. + /// Internal server error. public static ErrorCode InternalServerError { get; } = new ErrorCode(InternalServerErrorValue); - /// ServiceUnavailable. + /// Service unavailable error. public static ErrorCode ServiceUnavailable { get; } = new ErrorCode(ServiceUnavailableValue); - /// Timeout. + /// Timeout error. public static ErrorCode Timeout { get; } = new ErrorCode(TimeoutValue); - /// QuotaExceeded. + /// Quota exceeded error. public static ErrorCode QuotaExceeded { get; } = new ErrorCode(QuotaExceededValue); - /// Conflict. + /// Conflict error. public static ErrorCode Conflict { get; } = new ErrorCode(ConflictValue); - /// Warning. + /// Warning error. public static ErrorCode Warning { get; } = new ErrorCode(WarningValue); /// Determines if two values are the same. public static bool operator ==(ErrorCode left, ErrorCode right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.Serialization.cs index 38b07181c0e4..e01f5d79dcd7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class ExtractedSummaryDocumentResult : IUtf8JsonSerializable + internal partial class ExtractedSummaryDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sentences"u8); - writer.WriteStartArray(); - foreach (var item in Sentences) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static ExtractedSummaryDocumentResult DeserializeExtractedSummaryDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList sentences = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList sentences = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sentences"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ExtractedSummarySentence.DeserializeExtractedSummarySentence(item)); - } - sentences = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -86,24 +48,26 @@ internal static ExtractedSummaryDocumentResult DeserializeExtractedSummaryDocume statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("sentences"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExtractedSummarySentence.DeserializeExtractedSummarySentence(item)); + } + sentences = array; + continue; + } } return new ExtractedSummaryDocumentResult(id, warnings, statistics, sentences); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ExtractedSummaryDocumentResult FromResponse(Response response) + internal static ExtractedSummaryDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeExtractedSummaryDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.cs index 462066aa88ba..a7355df0ce3d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummaryDocumentResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The ExtractedSummaryDocumentResult. - internal partial class ExtractedSummaryDocumentResult : DocumentResult + /// A ranked list of sentences representing the extracted summary. + internal partial class ExtractedSummaryDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. - /// A ranked list of sentences representing the extracted summary. + /// Specifies the the extracted sentences from the input document. /// , or is null. - public ExtractedSummaryDocumentResult(string id, IEnumerable warnings, IEnumerable sentences) : base(id, warnings) + internal ExtractedSummaryDocumentResult(string id, IEnumerable warnings, IEnumerable sentences) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(sentences, nameof(sentences)); + Id = id; + Warnings = warnings.ToList(); Sentences = sentences.ToList(); } @@ -32,13 +34,22 @@ public ExtractedSummaryDocumentResult(string id, IEnumerable wa /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// A ranked list of sentences representing the extracted summary. - internal ExtractedSummaryDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList sentences) : base(id, warnings, statistics) + /// Specifies the the extracted sentences from the input document. + internal ExtractedSummaryDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList sentences) { + Id = id; + Warnings = warnings; + Statistics = statistics; Sentences = sentences; } - /// A ranked list of sentences representing the extracted summary. - public IList Sentences { get; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } + /// Specifies the the extracted sentences from the input document. + public IReadOnlyList Sentences { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.Serialization.cs index 31f2d0b0e8da..e2a0d9f7d163 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.Serialization.cs @@ -6,26 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class ExtractedSummarySentence : IUtf8JsonSerializable + internal partial class ExtractedSummarySentence { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("rankScore"u8); - writer.WriteNumberValue(RankScore); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WriteEndObject(); - } - internal static ExtractedSummarySentence DeserializeExtractedSummarySentence(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -69,13 +54,5 @@ internal static ExtractedSummarySentence FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeExtractedSummarySentence(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.cs index c1fab1c9ee90..03b41e5deb09 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractedSummarySentence.cs @@ -9,7 +9,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The ExtractedSummarySentence. + /// Represents an extracted sentences from the input document. internal partial class ExtractedSummarySentence { /// Initializes a new instance of . @@ -18,7 +18,7 @@ internal partial class ExtractedSummarySentence /// The sentence offset from the start of the document, based on the value of the parameter StringIndexType. /// The length of the sentence. /// is null. - public ExtractedSummarySentence(string text, double rankScore, int offset, int length) + internal ExtractedSummarySentence(string text, double rankScore, int offset, int length) { Argument.AssertNotNull(text, nameof(text)); @@ -29,12 +29,12 @@ public ExtractedSummarySentence(string text, double rankScore, int offset, int l } /// The extracted sentence text. - public string Text { get; set; } + public string Text { get; } /// A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance. - public double RankScore { get; set; } + public double RankScore { get; } /// The sentence offset from the start of the document, based on the value of the parameter StringIndexType. - public int Offset { get; set; } + public int Offset { get; } /// The length of the sentence. - public int Length { get; set; } + public int Length { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.Serialization.cs index 86f6eb507ddc..bf5dd41ed2d5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class ExtractiveSummarizationLROResult : IUtf8JsonSerializable + internal partial class ExtractiveSummarizationLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static ExtractiveSummarizationLROResult DeserializeExtractiveSummarizationLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static ExtractiveSummarizationLROResult DeserializeExtractiveSummarizat return null; } ExtractiveSummarizationResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static ExtractiveSummarizationLROResult DeserializeExtractiveSummarizat results = ExtractiveSummarizationResult.DeserializeExtractiveSummarizationResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new ExtractiveSummarizationLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new ExtractiveSummarizationLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static ExtractiveSummarizationLROResult DeserializeExtractiveSummarizat using var document = JsonDocument.Parse(response.Content); return DeserializeExtractiveSummarizationLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.cs index b590b1022d19..a9bfccdc2f50 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The ExtractiveSummarizationLROResult. + /// An object representing the results for an Extractive Summarization task. internal partial class ExtractiveSummarizationLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Results of the task. /// is null. - public ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, status) + internal ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextA } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Results of the task. + internal ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public ExtractiveSummarizationResult Results { get; set; } + /// Results of the task. + public ExtractiveSummarizationResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.Serialization.cs index b3c77501d003..ecb29aa756c9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static ExtractiveSummarizationLROTask DeserializeExtractiveSummarizationLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ExtractiveSummarizationTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = ExtractiveSummarizationTaskParameters.DeserializeExtractiveSummarizationTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new ExtractiveSummarizationLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new ExtractiveSummarizationLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeExtractiveSummarizationLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.cs index fd4d7569d227..b9f9323a902d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationLROTask.cs @@ -17,16 +17,16 @@ public ExtractiveSummarizationLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for an Extractive Summarization task. + /// task name. + /// The kind of task to perform. + /// Parameters for the Extractive Summarization task. internal ExtractiveSummarizationLROTask(string taskName, AnalyzeTextLROTaskKind kind, ExtractiveSummarizationTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for an Extractive Summarization task. + /// Parameters for the Extractive Summarization task. public ExtractiveSummarizationTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.Serialization.cs index 418d949fdcc2..fd6f839d54bf 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class ExtractiveSummarizationResult : IUtf8JsonSerializable + internal partial class ExtractiveSummarizationResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static ExtractiveSummarizationResult DeserializeExtractiveSummarizationResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ExtractedSummaryDocumentResult.DeserializeExtractedSummaryDocumentResult(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static ExtractiveSummarizationResult DeserializeExtractiveSummarization modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExtractedSummaryDocumentResult.DeserializeExtractedSummaryDocumentResult(item)); + } + documents = array; + continue; + } } return new ExtractiveSummarizationResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ExtractiveSummarizationResult FromResponse(Response response) + internal static ExtractiveSummarizationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeExtractiveSummarizationResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.cs index 41f1f77561e1..3d69cce9e3c9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The ExtractiveSummarizationResult. - internal partial class ExtractiveSummarizationResult : PreBuiltResult + /// An object representing the pre-built Extractive Summarization results of each document. + internal partial class ExtractiveSummarizationResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - public ExtractiveSummarizationResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal ExtractiveSummarizationResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -33,12 +35,21 @@ public ExtractiveSummarizationResult(IEnumerable errors, string m /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - internal ExtractiveSummarizationResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + internal ExtractiveSummarizationResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } /// Response by document. - public IList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.Serialization.cs index cb72bb8ddc49..bcffeaa1f59e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.Serialization.cs @@ -15,6 +15,16 @@ internal partial class ExtractiveSummarizationTaskParameters : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(LoggingOptOut)) + { + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); + } + if (Optional.IsDefined(ModelVersion)) + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } if (Optional.IsDefined(SentenceCount)) { writer.WritePropertyName("sentenceCount"u8); @@ -30,87 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("stringIndexType"u8); writer.WriteStringValue(StringIndexType.Value.ToString()); } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } writer.WriteEndObject(); } - internal static ExtractiveSummarizationTaskParameters DeserializeExtractiveSummarizationTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? sentenceCount = default; - ExtractiveSummarySentencesOrder? sortBy = default; - StringIndexType? stringIndexType = default; - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sentenceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sentenceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("sortBy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sortBy = new ExtractiveSummarySentencesOrder(property.Value.GetString()); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new ExtractiveSummarizationTaskParameters(loggingOptOut, modelVersion, sentenceCount, sortBy, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new ExtractiveSummarizationTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeExtractiveSummarizationTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.cs index b1ab48b6d40c..19aa5e3bc317 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for an Extractive Summarization task. - internal partial class ExtractiveSummarizationTaskParameters : PreBuiltTaskParameters + internal partial class ExtractiveSummarizationTaskParameters { /// Initializes a new instance of . public ExtractiveSummarizationTaskParameters() @@ -16,23 +16,29 @@ public ExtractiveSummarizationTaskParameters() } /// Initializes a new instance of . - /// - /// - /// - /// The sorting criteria to use for the results of Extractive Summarization. - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal ExtractiveSummarizationTaskParameters(bool? loggingOptOut, string modelVersion, int? sentenceCount, ExtractiveSummarySentencesOrder? sortBy, StringIndexType? stringIndexType) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + /// Specifies the number of sentences in the extracted summary. + /// Specifies how to sort the extracted summaries. + /// Specifies the method used to interpret string offsets. + internal ExtractiveSummarizationTaskParameters(bool? loggingOptOut, string modelVersion, long? sentenceCount, ExtractiveSummarySentencesOrder? sortBy, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; SentenceCount = sentenceCount; SortBy = sortBy; StringIndexType = stringIndexType; } - /// Gets or sets the sentence count. - public int? SentenceCount { get; set; } - /// The sorting criteria to use for the results of Extractive Summarization. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Specifies the number of sentences in the extracted summary. + public long? SentenceCount { get; set; } + /// Specifies how to sort the extracted summaries. public ExtractiveSummarySentencesOrder? SortBy { get; set; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// Specifies the method used to interpret string offsets. public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarySentencesOrder.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarySentencesOrder.cs index bb5c43b66ef8..b9d3903ea916 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarySentencesOrder.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarySentencesOrder.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics { - /// The sorting criteria to use for the results of Extractive Summarization. + /// Specifies how to sort the extracted summaries. public readonly partial struct ExtractiveSummarySentencesOrder : IEquatable { private readonly string _value; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.Serialization.cs index d5d33a1314bf..c8fe8dc9c26d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.Serialization.cs @@ -7,79 +7,24 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class HealthcareEntitiesDocumentResult : IUtf8JsonSerializable + internal partial class HealthcareEntitiesDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("relations"u8); - writer.WriteStartArray(); - foreach (var item in Relations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static HealthcareEntitiesDocumentResult DeserializeHealthcareEntitiesDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList entities = default; - IList relations = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList entities = default; + IReadOnlyList relations = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareEntityInternal.DeserializeHealthcareEntityInternal(item)); - } - entities = array; - continue; - } - if (property.NameEquals("relations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareRelationInternal.DeserializeHealthcareRelationInternal(item)); - } - relations = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -104,24 +49,36 @@ internal static HealthcareEntitiesDocumentResult DeserializeHealthcareEntitiesDo statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthcareEntityInternal.DeserializeHealthcareEntityInternal(item)); + } + entities = array; + continue; + } + if (property.NameEquals("relations"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthcareRelationInternal.DeserializeHealthcareRelationInternal(item)); + } + relations = array; + continue; + } } return new HealthcareEntitiesDocumentResult(id, warnings, statistics, entities, relations); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new HealthcareEntitiesDocumentResult FromResponse(Response response) + internal static HealthcareEntitiesDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareEntitiesDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.cs index 67a7876d127b..4f0945e0d0ab 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntitiesDocumentResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.TextAnalytics.Models { - /// The HealthcareEntitiesDocumentResult. - internal partial class HealthcareEntitiesDocumentResult : DocumentResult + /// Result object for the processed Healthcare document. + internal partial class HealthcareEntitiesDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. @@ -20,13 +20,15 @@ internal partial class HealthcareEntitiesDocumentResult : DocumentResult /// Healthcare entities. /// Healthcare entity relations. /// , , or is null. - public HealthcareEntitiesDocumentResult(string id, IEnumerable warnings, IEnumerable entities, IEnumerable relations) : base(id, warnings) + internal HealthcareEntitiesDocumentResult(string id, IEnumerable warnings, IEnumerable entities, IEnumerable relations) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(entities, nameof(entities)); Argument.AssertNotNull(relations, nameof(relations)); + Id = id; + Warnings = warnings.ToList(); Entities = entities.ToList(); Relations = relations.ToList(); } @@ -37,15 +39,24 @@ public HealthcareEntitiesDocumentResult(string id, IEnumerable /// if showStats=true was specified in the request this field will contain information about the document payload. /// Healthcare entities. /// Healthcare entity relations. - internal HealthcareEntitiesDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList entities, IList relations) : base(id, warnings, statistics) + internal HealthcareEntitiesDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList entities, IReadOnlyList relations) { + Id = id; + Warnings = warnings; + Statistics = statistics; Entities = entities; Relations = relations; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// Healthcare entities. - public IList Entities { get; } + public IReadOnlyList Entities { get; } /// Healthcare entity relations. - public IList Relations { get; } + public IReadOnlyList Relations { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.Serialization.cs index cb037b910fdc..1ccd7cc31b4b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.Serialization.cs @@ -6,33 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics { - public partial class HealthcareEntityAssertion : IUtf8JsonSerializable + public partial class HealthcareEntityAssertion { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Conditionality)) - { - writer.WritePropertyName("conditionality"u8); - writer.WriteStringValue(Conditionality.Value.ToSerialString()); - } - if (Optional.IsDefined(Certainty)) - { - writer.WritePropertyName("certainty"u8); - writer.WriteStringValue(Certainty.Value.ToSerialString()); - } - if (Optional.IsDefined(Association)) - { - writer.WritePropertyName("association"u8); - writer.WriteStringValue(Association.Value.ToSerialString()); - } - writer.WriteEndObject(); - } - internal static HealthcareEntityAssertion DeserializeHealthcareEntityAssertion(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -82,13 +60,5 @@ internal static HealthcareEntityAssertion FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareEntityAssertion(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.cs index 2c618651c931..91993a8c487c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityAssertion.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics { - /// The HealthcareAssertion. + /// Assertion of the entity. public partial class HealthcareEntityAssertion { /// Initializes a new instance of . diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityCategory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityCategory.cs index 8347c35c3481..45888d99f373 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityCategory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityCategory.cs @@ -25,7 +25,6 @@ public HealthcareEntityCategory(string value) private const string BodyStructureValue = "BodyStructure"; private const string AgeValue = "Age"; private const string GenderValue = "Gender"; - private const string EthnicityValue = "Ethnicity"; private const string ExaminationNameValue = "ExaminationName"; private const string DateValue = "Date"; private const string DirectionValue = "Direction"; @@ -34,18 +33,14 @@ public HealthcareEntityCategory(string value) private const string MeasurementUnitValue = "MeasurementUnit"; private const string RelationalOperatorValue = "RelationalOperator"; private const string TimeValue = "Time"; - private const string CourseValue = "Course"; private const string GeneOrProteinValue = "GeneOrProtein"; private const string VariantValue = "Variant"; - private const string ExpressionValue = "Expression"; - private const string MutationTypeValue = "MutationType"; private const string AdministrativeEventValue = "AdministrativeEvent"; private const string CareEnvironmentValue = "CareEnvironment"; private const string HealthcareProfessionValue = "HealthcareProfession"; private const string DiagnosisValue = "Diagnosis"; private const string SymptomOrSignValue = "SymptomOrSign"; private const string ConditionQualifierValue = "ConditionQualifier"; - private const string ConditionScaleValue = "ConditionScale"; private const string MedicationClassValue = "MedicationClass"; private const string MedicationNameValue = "MedicationName"; private const string DosageValue = "Dosage"; @@ -53,21 +48,24 @@ public HealthcareEntityCategory(string value) private const string MedicationRouteValue = "MedicationRoute"; private const string FamilyRelationValue = "FamilyRelation"; private const string TreatmentNameValue = "TreatmentName"; + private const string EthnicityValue = "Ethnicity"; + private const string CourseValue = "Course"; + private const string ExpressionValue = "Expression"; + private const string MutationTypeValue = "MutationType"; + private const string ConditionScaleValue = "ConditionScale"; private const string AllergenValue = "Allergen"; private const string EmploymentValue = "Employment"; private const string LivingStatusValue = "LivingStatus"; private const string SubstanceUseValue = "SubstanceUse"; private const string SubstanceUseAmountValue = "SubstanceUseAmount"; - /// BodyStructure. + /// Body structure. public static HealthcareEntityCategory BodyStructure { get; } = new HealthcareEntityCategory(BodyStructureValue); /// Age. public static HealthcareEntityCategory Age { get; } = new HealthcareEntityCategory(AgeValue); /// Gender. public static HealthcareEntityCategory Gender { get; } = new HealthcareEntityCategory(GenderValue); - /// Ethnicity. - public static HealthcareEntityCategory Ethnicity { get; } = new HealthcareEntityCategory(EthnicityValue); - /// ExaminationName. + /// Examination name. public static HealthcareEntityCategory ExaminationName { get; } = new HealthcareEntityCategory(ExaminationNameValue); /// Date. public static HealthcareEntityCategory Date { get; } = new HealthcareEntityCategory(DateValue); @@ -75,61 +73,63 @@ public HealthcareEntityCategory(string value) public static HealthcareEntityCategory Direction { get; } = new HealthcareEntityCategory(DirectionValue); /// Frequency. public static HealthcareEntityCategory Frequency { get; } = new HealthcareEntityCategory(FrequencyValue); - /// MeasurementValue. + /// Measurement value. public static HealthcareEntityCategory MeasurementValue { get; } = new HealthcareEntityCategory(MeasurementValueValue); - /// MeasurementUnit. + /// Measurement unit. public static HealthcareEntityCategory MeasurementUnit { get; } = new HealthcareEntityCategory(MeasurementUnitValue); - /// RelationalOperator. + /// Relational operator. public static HealthcareEntityCategory RelationalOperator { get; } = new HealthcareEntityCategory(RelationalOperatorValue); /// Time. public static HealthcareEntityCategory Time { get; } = new HealthcareEntityCategory(TimeValue); - /// Course. - public static HealthcareEntityCategory Course { get; } = new HealthcareEntityCategory(CourseValue); - /// GeneOrProtein. + /// Gene or protein. public static HealthcareEntityCategory GeneOrProtein { get; } = new HealthcareEntityCategory(GeneOrProteinValue); /// Variant. public static HealthcareEntityCategory Variant { get; } = new HealthcareEntityCategory(VariantValue); - /// Expression. - public static HealthcareEntityCategory Expression { get; } = new HealthcareEntityCategory(ExpressionValue); - /// MutationType. - public static HealthcareEntityCategory MutationType { get; } = new HealthcareEntityCategory(MutationTypeValue); - /// AdministrativeEvent. + /// Administrative event. public static HealthcareEntityCategory AdministrativeEvent { get; } = new HealthcareEntityCategory(AdministrativeEventValue); - /// CareEnvironment. + /// Care environment. public static HealthcareEntityCategory CareEnvironment { get; } = new HealthcareEntityCategory(CareEnvironmentValue); - /// HealthcareProfession. + /// Healthcare profession. public static HealthcareEntityCategory HealthcareProfession { get; } = new HealthcareEntityCategory(HealthcareProfessionValue); /// Diagnosis. public static HealthcareEntityCategory Diagnosis { get; } = new HealthcareEntityCategory(DiagnosisValue); - /// SymptomOrSign. + /// Symptom or sign. public static HealthcareEntityCategory SymptomOrSign { get; } = new HealthcareEntityCategory(SymptomOrSignValue); - /// ConditionQualifier. + /// Condition qualifier. public static HealthcareEntityCategory ConditionQualifier { get; } = new HealthcareEntityCategory(ConditionQualifierValue); - /// ConditionScale. - public static HealthcareEntityCategory ConditionScale { get; } = new HealthcareEntityCategory(ConditionScaleValue); - /// MedicationClass. + /// Medication class. public static HealthcareEntityCategory MedicationClass { get; } = new HealthcareEntityCategory(MedicationClassValue); - /// MedicationName. + /// Medication name. public static HealthcareEntityCategory MedicationName { get; } = new HealthcareEntityCategory(MedicationNameValue); /// Dosage. public static HealthcareEntityCategory Dosage { get; } = new HealthcareEntityCategory(DosageValue); - /// MedicationForm. + /// Medication form. public static HealthcareEntityCategory MedicationForm { get; } = new HealthcareEntityCategory(MedicationFormValue); - /// MedicationRoute. + /// Medication route. public static HealthcareEntityCategory MedicationRoute { get; } = new HealthcareEntityCategory(MedicationRouteValue); - /// FamilyRelation. + /// Family relation. public static HealthcareEntityCategory FamilyRelation { get; } = new HealthcareEntityCategory(FamilyRelationValue); - /// TreatmentName. + /// Treatment name. public static HealthcareEntityCategory TreatmentName { get; } = new HealthcareEntityCategory(TreatmentNameValue); + /// Ethnicity. + public static HealthcareEntityCategory Ethnicity { get; } = new HealthcareEntityCategory(EthnicityValue); + /// Course. + public static HealthcareEntityCategory Course { get; } = new HealthcareEntityCategory(CourseValue); + /// Expression. + public static HealthcareEntityCategory Expression { get; } = new HealthcareEntityCategory(ExpressionValue); + /// Mutation type. + public static HealthcareEntityCategory MutationType { get; } = new HealthcareEntityCategory(MutationTypeValue); + /// Condition scale. + public static HealthcareEntityCategory ConditionScale { get; } = new HealthcareEntityCategory(ConditionScaleValue); /// Allergen. public static HealthcareEntityCategory Allergen { get; } = new HealthcareEntityCategory(AllergenValue); /// Employment. public static HealthcareEntityCategory Employment { get; } = new HealthcareEntityCategory(EmploymentValue); - /// LivingStatus. + /// Living status. public static HealthcareEntityCategory LivingStatus { get; } = new HealthcareEntityCategory(LivingStatusValue); - /// SubstanceUse. + /// Substance use. public static HealthcareEntityCategory SubstanceUse { get; } = new HealthcareEntityCategory(SubstanceUseValue); - /// SubstanceUseAmount. + /// Substance use amount. public static HealthcareEntityCategory SubstanceUseAmount { get; } = new HealthcareEntityCategory(SubstanceUseAmountValue); /// Determines if two values are the same. public static bool operator ==(HealthcareEntityCategory left, HealthcareEntityCategory right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.Serialization.cs index 9f3e1f6abbd9..87aec2799cdd 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.Serialization.cs @@ -7,53 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class HealthcareEntityInternal : IUtf8JsonSerializable + internal partial class HealthcareEntityInternal { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category.ToString()); - if (Optional.IsDefined(Subcategory)) - { - writer.WritePropertyName("subcategory"u8); - writer.WriteStringValue(Subcategory); - } - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WritePropertyName("confidenceScore"u8); - writer.WriteNumberValue(ConfidenceScore); - if (Optional.IsDefined(Assertion)) - { - writer.WritePropertyName("assertion"u8); - writer.WriteObjectValue(Assertion); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsCollectionDefined(Links)) - { - writer.WritePropertyName("links"u8); - writer.WriteStartArray(); - foreach (var item in Links) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - internal static HealthcareEntityInternal DeserializeHealthcareEntityInternal(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -68,7 +26,7 @@ internal static HealthcareEntityInternal DeserializeHealthcareEntityInternal(Jso double confidenceScore = default; HealthcareEntityAssertion assertion = default; string name = default; - IList links = default; + IReadOnlyList links = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text"u8)) @@ -149,13 +107,5 @@ internal static HealthcareEntityInternal FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareEntityInternal(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.cs index b06f3bcada85..d384a4bd2ce5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityInternal.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The HealthcareEntity. + /// Healthcare entity extracted from the document. internal partial class HealthcareEntityInternal { /// Initializes a new instance of . @@ -20,7 +20,7 @@ internal partial class HealthcareEntityInternal /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. /// is null. - public HealthcareEntityInternal(string text, HealthcareEntityCategory category, int offset, int length, double confidenceScore) + internal HealthcareEntityInternal(string text, HealthcareEntityCategory category, int offset, int length, double confidenceScore) { Argument.AssertNotNull(text, nameof(text)); @@ -39,10 +39,10 @@ public HealthcareEntityInternal(string text, HealthcareEntityCategory category, /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// + /// Assertion of the entity. /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. /// Entity references in known data sources. - internal HealthcareEntityInternal(string text, HealthcareEntityCategory category, string subcategory, int offset, int length, double confidenceScore, HealthcareEntityAssertion assertion, string name, IList links) + internal HealthcareEntityInternal(string text, HealthcareEntityCategory category, string subcategory, int offset, int length, double confidenceScore, HealthcareEntityAssertion assertion, string name, IReadOnlyList links) { Text = text; Category = category; @@ -56,22 +56,22 @@ internal HealthcareEntityInternal(string text, HealthcareEntityCategory category } /// Entity text as appears in the request. - public string Text { get; set; } + public string Text { get; } /// Healthcare Entity Category. - public HealthcareEntityCategory Category { get; set; } + public HealthcareEntityCategory Category { get; } /// (Optional) Entity sub type. - public string Subcategory { get; set; } + public string Subcategory { get; } /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - public int Offset { get; set; } + public int Offset { get; } /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - public int Length { get; set; } + public int Length { get; } /// Confidence score between 0 and 1 of the extracted entity. - public double ConfidenceScore { get; set; } - /// Gets or sets the assertion. - public HealthcareEntityAssertion Assertion { get; set; } + public double ConfidenceScore { get; } + /// Assertion of the entity. + public HealthcareEntityAssertion Assertion { get; } /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - public string Name { get; set; } + public string Name { get; } /// Entity references in known data sources. - public IList Links { get; } + public IReadOnlyList Links { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityRelationType.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityRelationType.cs index ac290ff6ed35..ca76f9b385b5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityRelationType.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareEntityRelationType.cs @@ -23,30 +23,17 @@ public HealthcareEntityRelationType(string value) } private const string AbbreviationValue = "Abbreviation"; - private const string BodySiteOfConditionValue = "BodySiteOfCondition"; - private const string BodySiteOfTreatmentValue = "BodySiteOfTreatment"; - private const string CourseOfConditionValue = "CourseOfCondition"; - private const string CourseOfExaminationValue = "CourseOfExamination"; - private const string CourseOfMedicationValue = "CourseOfMedication"; - private const string CourseOfTreatmentValue = "CourseOfTreatment"; private const string DirectionOfBodyStructureValue = "DirectionOfBodyStructure"; private const string DirectionOfConditionValue = "DirectionOfCondition"; private const string DirectionOfExaminationValue = "DirectionOfExamination"; private const string DirectionOfTreatmentValue = "DirectionOfTreatment"; private const string DosageOfMedicationValue = "DosageOfMedication"; - private const string ExaminationFindsConditionValue = "ExaminationFindsCondition"; - private const string ExpressionOfGeneValue = "ExpressionOfGene"; - private const string ExpressionOfVariantValue = "ExpressionOfVariant"; private const string FormOfMedicationValue = "FormOfMedication"; - private const string FrequencyOfConditionValue = "FrequencyOfCondition"; private const string FrequencyOfMedicationValue = "FrequencyOfMedication"; private const string FrequencyOfTreatmentValue = "FrequencyOfTreatment"; - private const string MutationTypeOfGeneValue = "MutationTypeOfGene"; - private const string MutationTypeOfVariantValue = "MutationTypeOfVariant"; private const string QualifierOfConditionValue = "QualifierOfCondition"; private const string RelationOfExaminationValue = "RelationOfExamination"; private const string RouteOfMedicationValue = "RouteOfMedication"; - private const string ScaleOfConditionValue = "ScaleOfCondition"; private const string TimeOfConditionValue = "TimeOfCondition"; private const string TimeOfEventValue = "TimeOfEvent"; private const string TimeOfExaminationValue = "TimeOfExamination"; @@ -56,77 +43,90 @@ public HealthcareEntityRelationType(string value) private const string UnitOfExaminationValue = "UnitOfExamination"; private const string ValueOfConditionValue = "ValueOfCondition"; private const string ValueOfExaminationValue = "ValueOfExamination"; + private const string BodySiteOfConditionValue = "BodySiteOfCondition"; + private const string BodySiteOfTreatmentValue = "BodySiteOfTreatment"; + private const string CourseOfConditionValue = "CourseOfCondition"; + private const string CourseOfExaminationValue = "CourseOfExamination"; + private const string CourseOfMedicationValue = "CourseOfMedication"; + private const string CourseOfTreatmentValue = "CourseOfTreatment"; + private const string ExaminationFindsConditionValue = "ExaminationFindsCondition"; + private const string ExpressionOfGeneValue = "ExpressionOfGene"; + private const string ExpressionOfVariantValue = "ExpressionOfVariant"; + private const string FrequencyOfConditionValue = "FrequencyOfCondition"; + private const string MutationTypeOfGeneValue = "MutationTypeOfGene"; + private const string MutationTypeOfVariantValue = "MutationTypeOfVariant"; + private const string ScaleOfConditionValue = "ScaleOfCondition"; private const string VariantOfGeneValue = "VariantOfGene"; /// Abbreviation. public static HealthcareEntityRelationType Abbreviation { get; } = new HealthcareEntityRelationType(AbbreviationValue); - /// BodySiteOfCondition. - public static HealthcareEntityRelationType BodySiteOfCondition { get; } = new HealthcareEntityRelationType(BodySiteOfConditionValue); - /// BodySiteOfTreatment. - public static HealthcareEntityRelationType BodySiteOfTreatment { get; } = new HealthcareEntityRelationType(BodySiteOfTreatmentValue); - /// CourseOfCondition. - public static HealthcareEntityRelationType CourseOfCondition { get; } = new HealthcareEntityRelationType(CourseOfConditionValue); - /// CourseOfExamination. - public static HealthcareEntityRelationType CourseOfExamination { get; } = new HealthcareEntityRelationType(CourseOfExaminationValue); - /// CourseOfMedication. - public static HealthcareEntityRelationType CourseOfMedication { get; } = new HealthcareEntityRelationType(CourseOfMedicationValue); - /// CourseOfTreatment. - public static HealthcareEntityRelationType CourseOfTreatment { get; } = new HealthcareEntityRelationType(CourseOfTreatmentValue); - /// DirectionOfBodyStructure. + /// Direction of body structure. public static HealthcareEntityRelationType DirectionOfBodyStructure { get; } = new HealthcareEntityRelationType(DirectionOfBodyStructureValue); - /// DirectionOfCondition. + /// Direction of condition. public static HealthcareEntityRelationType DirectionOfCondition { get; } = new HealthcareEntityRelationType(DirectionOfConditionValue); - /// DirectionOfExamination. + /// Direction of examination. public static HealthcareEntityRelationType DirectionOfExamination { get; } = new HealthcareEntityRelationType(DirectionOfExaminationValue); - /// DirectionOfTreatment. + /// Direction of treatment. public static HealthcareEntityRelationType DirectionOfTreatment { get; } = new HealthcareEntityRelationType(DirectionOfTreatmentValue); - /// DosageOfMedication. + /// Dosage of medication. public static HealthcareEntityRelationType DosageOfMedication { get; } = new HealthcareEntityRelationType(DosageOfMedicationValue); - /// ExaminationFindsCondition. - public static HealthcareEntityRelationType ExaminationFindsCondition { get; } = new HealthcareEntityRelationType(ExaminationFindsConditionValue); - /// ExpressionOfGene. - public static HealthcareEntityRelationType ExpressionOfGene { get; } = new HealthcareEntityRelationType(ExpressionOfGeneValue); - /// ExpressionOfVariant. - public static HealthcareEntityRelationType ExpressionOfVariant { get; } = new HealthcareEntityRelationType(ExpressionOfVariantValue); - /// FormOfMedication. + /// Form of medication. public static HealthcareEntityRelationType FormOfMedication { get; } = new HealthcareEntityRelationType(FormOfMedicationValue); - /// FrequencyOfCondition. - public static HealthcareEntityRelationType FrequencyOfCondition { get; } = new HealthcareEntityRelationType(FrequencyOfConditionValue); - /// FrequencyOfMedication. + /// Frequency of medication. public static HealthcareEntityRelationType FrequencyOfMedication { get; } = new HealthcareEntityRelationType(FrequencyOfMedicationValue); - /// FrequencyOfTreatment. + /// Frequency of treatment. public static HealthcareEntityRelationType FrequencyOfTreatment { get; } = new HealthcareEntityRelationType(FrequencyOfTreatmentValue); - /// MutationTypeOfGene. - public static HealthcareEntityRelationType MutationTypeOfGene { get; } = new HealthcareEntityRelationType(MutationTypeOfGeneValue); - /// MutationTypeOfVariant. - public static HealthcareEntityRelationType MutationTypeOfVariant { get; } = new HealthcareEntityRelationType(MutationTypeOfVariantValue); - /// QualifierOfCondition. + /// Qualifier of condition. public static HealthcareEntityRelationType QualifierOfCondition { get; } = new HealthcareEntityRelationType(QualifierOfConditionValue); - /// RelationOfExamination. + /// Relation of examination. public static HealthcareEntityRelationType RelationOfExamination { get; } = new HealthcareEntityRelationType(RelationOfExaminationValue); - /// RouteOfMedication. + /// Route of medication. public static HealthcareEntityRelationType RouteOfMedication { get; } = new HealthcareEntityRelationType(RouteOfMedicationValue); - /// ScaleOfCondition. - public static HealthcareEntityRelationType ScaleOfCondition { get; } = new HealthcareEntityRelationType(ScaleOfConditionValue); - /// TimeOfCondition. + /// Time of condition. public static HealthcareEntityRelationType TimeOfCondition { get; } = new HealthcareEntityRelationType(TimeOfConditionValue); - /// TimeOfEvent. + /// Time of event. public static HealthcareEntityRelationType TimeOfEvent { get; } = new HealthcareEntityRelationType(TimeOfEventValue); - /// TimeOfExamination. + /// Time of examination. public static HealthcareEntityRelationType TimeOfExamination { get; } = new HealthcareEntityRelationType(TimeOfExaminationValue); - /// TimeOfMedication. + /// Time of medication. public static HealthcareEntityRelationType TimeOfMedication { get; } = new HealthcareEntityRelationType(TimeOfMedicationValue); - /// TimeOfTreatment. + /// Time of treatment. public static HealthcareEntityRelationType TimeOfTreatment { get; } = new HealthcareEntityRelationType(TimeOfTreatmentValue); - /// UnitOfCondition. + /// Unit of condition. public static HealthcareEntityRelationType UnitOfCondition { get; } = new HealthcareEntityRelationType(UnitOfConditionValue); - /// UnitOfExamination. + /// Unit of examination. public static HealthcareEntityRelationType UnitOfExamination { get; } = new HealthcareEntityRelationType(UnitOfExaminationValue); - /// ValueOfCondition. + /// Value of condition. public static HealthcareEntityRelationType ValueOfCondition { get; } = new HealthcareEntityRelationType(ValueOfConditionValue); - /// ValueOfExamination. + /// Value of examination. public static HealthcareEntityRelationType ValueOfExamination { get; } = new HealthcareEntityRelationType(ValueOfExaminationValue); - /// VariantOfGene. + /// Body site of condition. + public static HealthcareEntityRelationType BodySiteOfCondition { get; } = new HealthcareEntityRelationType(BodySiteOfConditionValue); + /// Body site of treatment. + public static HealthcareEntityRelationType BodySiteOfTreatment { get; } = new HealthcareEntityRelationType(BodySiteOfTreatmentValue); + /// Course of condition. + public static HealthcareEntityRelationType CourseOfCondition { get; } = new HealthcareEntityRelationType(CourseOfConditionValue); + /// Course of examination. + public static HealthcareEntityRelationType CourseOfExamination { get; } = new HealthcareEntityRelationType(CourseOfExaminationValue); + /// Course of medication. + public static HealthcareEntityRelationType CourseOfMedication { get; } = new HealthcareEntityRelationType(CourseOfMedicationValue); + /// Course of treatment. + public static HealthcareEntityRelationType CourseOfTreatment { get; } = new HealthcareEntityRelationType(CourseOfTreatmentValue); + /// Examination finds condition. + public static HealthcareEntityRelationType ExaminationFindsCondition { get; } = new HealthcareEntityRelationType(ExaminationFindsConditionValue); + /// Expression of gene. + public static HealthcareEntityRelationType ExpressionOfGene { get; } = new HealthcareEntityRelationType(ExpressionOfGeneValue); + /// Expression of variant. + public static HealthcareEntityRelationType ExpressionOfVariant { get; } = new HealthcareEntityRelationType(ExpressionOfVariantValue); + /// Frequency of condition. + public static HealthcareEntityRelationType FrequencyOfCondition { get; } = new HealthcareEntityRelationType(FrequencyOfConditionValue); + /// Mutation type of gene. + public static HealthcareEntityRelationType MutationTypeOfGene { get; } = new HealthcareEntityRelationType(MutationTypeOfGeneValue); + /// Mutation type of variant. + public static HealthcareEntityRelationType MutationTypeOfVariant { get; } = new HealthcareEntityRelationType(MutationTypeOfVariantValue); + /// Scale of condition. + public static HealthcareEntityRelationType ScaleOfCondition { get; } = new HealthcareEntityRelationType(ScaleOfConditionValue); + /// Variant of gene. public static HealthcareEntityRelationType VariantOfGene { get; } = new HealthcareEntityRelationType(VariantOfGeneValue); /// Determines if two values are the same. public static bool operator ==(HealthcareEntityRelationType left, HealthcareEntityRelationType right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.Serialization.cs index 0df65ab2cd5e..32d18de92013 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class HealthcareLROResult : IUtf8JsonSerializable + internal partial class HealthcareLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static HealthcareLROResult DeserializeHealthcareLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static HealthcareLROResult DeserializeHealthcareLROResult(JsonElement e return null; } HealthcareResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static HealthcareLROResult DeserializeHealthcareLROResult(JsonElement e results = HealthcareResult.DeserializeHealthcareResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new HealthcareLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new HealthcareLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static HealthcareLROResult DeserializeHealthcareLROResult(JsonElement e using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.cs index 4b591f383115..411c15d52d18 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The HealthcareLROResult. + /// Healthcare Analyze Text long tunning operation result object. internal partial class HealthcareLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// Results of the task. /// is null. - public HealthcareLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, HealthcareResult results) : base(lastUpdateDateTime, status) + internal HealthcareLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, HealthcareResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public HealthcareLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOpera } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal HealthcareLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, HealthcareResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// Results of the task. + internal HealthcareLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, HealthcareResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public HealthcareResult Results { get; set; } + /// Results of the task. + public HealthcareResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.Serialization.cs index 51742c2c2074..dd37b1493331 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static HealthcareLROTask DeserializeHealthcareLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HealthcareTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = HealthcareTaskParameters.DeserializeHealthcareTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new HealthcareLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new HealthcareLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeHealthcareLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.cs index 601a6f154f06..ea78fe9dd538 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareLROTask.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The HealthcareLROTask. + /// The long running task to be performed by the service on the Healthcare input documents. internal partial class HealthcareLROTask : AnalyzeTextLROTask { /// Initializes a new instance of . @@ -17,16 +17,16 @@ public HealthcareLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a Healthcare task. + /// task name. + /// The kind of task to perform. + /// Parameters for the Healthcare task. internal HealthcareLROTask(string taskName, AnalyzeTextLROTaskKind kind, HealthcareTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a Healthcare task. + /// Parameters for the Healthcare task. public HealthcareTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.Serialization.cs index c635b5b90ebf..2a5571dfc559 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class HealthcareRelationEntity : IUtf8JsonSerializable + internal partial class HealthcareRelationEntity { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("ref"u8); - writer.WriteStringValue(Ref); - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role); - writer.WriteEndObject(); - } - internal static HealthcareRelationEntity DeserializeHealthcareRelationEntity(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -53,13 +42,5 @@ internal static HealthcareRelationEntity FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareRelationEntity(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.cs index 341a6c26f37e..3a9ef9973cd8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationEntity.cs @@ -9,14 +9,14 @@ namespace Azure.AI.TextAnalytics.Models { - /// The HealthcareRelationEntity. + /// Entity in the relation. internal partial class HealthcareRelationEntity { /// Initializes a new instance of . /// Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . /// Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). /// or is null. - public HealthcareRelationEntity(string @ref, string role) + internal HealthcareRelationEntity(string @ref, string role) { Argument.AssertNotNull(@ref, nameof(@ref)); Argument.AssertNotNull(role, nameof(role)); @@ -26,8 +26,8 @@ public HealthcareRelationEntity(string @ref, string role) } /// Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . - public string Ref { get; set; } + public string Ref { get; } /// Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). - public string Role { get; set; } + public string Role { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.Serialization.cs index ac44c5700283..e624c6fb5813 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.Serialization.cs @@ -7,32 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class HealthcareRelationInternal : IUtf8JsonSerializable + internal partial class HealthcareRelationInternal { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("relationType"u8); - writer.WriteStringValue(RelationType.ToString()); - if (Optional.IsDefined(ConfidenceScore)) - { - writer.WritePropertyName("confidenceScore"u8); - writer.WriteNumberValue(ConfidenceScore.Value); - } - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - internal static HealthcareRelationInternal DeserializeHealthcareRelationInternal(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -40,8 +19,8 @@ internal static HealthcareRelationInternal DeserializeHealthcareRelationInternal return null; } HealthcareEntityRelationType relationType = default; + IReadOnlyList entities = default; double? confidenceScore = default; - IList entities = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("relationType"u8)) @@ -49,15 +28,6 @@ internal static HealthcareRelationInternal DeserializeHealthcareRelationInternal relationType = new HealthcareEntityRelationType(property.Value.GetString()); continue; } - if (property.NameEquals("confidenceScore"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - confidenceScore = property.Value.GetDouble(); - continue; - } if (property.NameEquals("entities"u8)) { List array = new List(); @@ -68,8 +38,17 @@ internal static HealthcareRelationInternal DeserializeHealthcareRelationInternal entities = array; continue; } + if (property.NameEquals("confidenceScore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidenceScore = property.Value.GetDouble(); + continue; + } } - return new HealthcareRelationInternal(relationType, confidenceScore, entities); + return new HealthcareRelationInternal(relationType, entities, confidenceScore); } /// Deserializes the model from a raw response. @@ -79,13 +58,5 @@ internal static HealthcareRelationInternal FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareRelationInternal(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.cs index 66ea6478a09e..38dc0aacf3e5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareRelationInternal.cs @@ -18,7 +18,7 @@ internal partial class HealthcareRelationInternal /// Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc. /// The entities in the relation. /// is null. - public HealthcareRelationInternal(HealthcareEntityRelationType relationType, IEnumerable entities) + internal HealthcareRelationInternal(HealthcareEntityRelationType relationType, IEnumerable entities) { Argument.AssertNotNull(entities, nameof(entities)); @@ -28,20 +28,20 @@ public HealthcareRelationInternal(HealthcareEntityRelationType relationType, IEn /// Initializes a new instance of . /// Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc. - /// Confidence score between 0 and 1 of the extracted relation. /// The entities in the relation. - internal HealthcareRelationInternal(HealthcareEntityRelationType relationType, double? confidenceScore, IList entities) + /// Confidence score between 0 and 1 of the extracted relation. + internal HealthcareRelationInternal(HealthcareEntityRelationType relationType, IReadOnlyList entities, double? confidenceScore) { RelationType = relationType; - ConfidenceScore = confidenceScore; Entities = entities; + ConfidenceScore = confidenceScore; } /// Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc. - public HealthcareEntityRelationType RelationType { get; set; } - /// Confidence score between 0 and 1 of the extracted relation. - public double? ConfidenceScore { get; set; } + public HealthcareEntityRelationType RelationType { get; } /// The entities in the relation. - public IList Entities { get; } + public IReadOnlyList Entities { get; } + /// Confidence score between 0 and 1 of the extracted relation. + public double? ConfidenceScore { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.Serialization.cs index e5418b03278d..eae3f6e722b7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class HealthcareResult : IUtf8JsonSerializable + internal partial class HealthcareResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static HealthcareResult DeserializeHealthcareResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareResultDocumentsItem.DeserializeHealthcareResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static HealthcareResult DeserializeHealthcareResult(JsonElement element modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthcareEntitiesDocumentResult.DeserializeHealthcareEntitiesDocumentResult(item)); + } + documents = array; + continue; + } } return new HealthcareResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new HealthcareResult FromResponse(Response response) + internal static HealthcareResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeHealthcareResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.cs index 3bfb87c96073..4936c352b180 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The HealthcareResult. - internal partial class HealthcareResult : PreBuiltResult + /// Result object for the processed Healthcare task. + internal partial class HealthcareResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. - /// + /// List of result objects for the processed Healthcare documents. /// , or is null. - public HealthcareResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal HealthcareResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -32,13 +34,22 @@ public HealthcareResult(IEnumerable errors, string modelVersion, /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. - /// - internal HealthcareResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + /// List of result objects for the processed Healthcare documents. + internal HealthcareResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } - /// Gets the documents. - public IList Documents { get; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } + /// List of result objects for the processed Healthcare documents. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResultDocumentsItem.Serialization.cs deleted file mode 100644 index 77f2ed8a23ad..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,127 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class HealthcareResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("relations"u8); - writer.WriteStartArray(); - foreach (var item in Relations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static HealthcareResultDocumentsItem DeserializeHealthcareResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList entities = default; - IList relations = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareEntityInternal.DeserializeHealthcareEntityInternal(item)); - } - entities = array; - continue; - } - if (property.NameEquals("relations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareRelationInternal.DeserializeHealthcareRelationInternal(item)); - } - relations = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new HealthcareResultDocumentsItem(id, warnings, statistics, entities, relations); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new HealthcareResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeHealthcareResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResultDocumentsItem.cs deleted file mode 100644 index 720c0df1f6d7..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareResultDocumentsItem.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The HealthcareResultDocumentsItem. - internal partial class HealthcareResultDocumentsItem : HealthcareEntitiesDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Healthcare entities. - /// Healthcare entity relations. - /// , , or is null. - public HealthcareResultDocumentsItem(string id, IEnumerable warnings, IEnumerable entities, IEnumerable relations) : base(id, warnings, entities, relations) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(entities, nameof(entities)); - Argument.AssertNotNull(relations, nameof(relations)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Healthcare entities. - /// Healthcare entity relations. - internal HealthcareResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList entities, IList relations) : base(id, warnings, statistics, entities, relations) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.Serialization.cs index 429b0da73052..95fafdbfc0c9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.Serialization.cs @@ -15,72 +15,26 @@ internal partial class HealthcareTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(StringIndexType)) + if (Optional.IsDefined(LoggingOptOut)) { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); } if (Optional.IsDefined(ModelVersion)) { writer.WritePropertyName("modelVersion"u8); writer.WriteStringValue(ModelVersion); } - if (Optional.IsDefined(LoggingOptOut)) + if (Optional.IsDefined(StringIndexType)) { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.Value.ToString()); } writer.WriteEndObject(); } - internal static HealthcareTaskParameters DeserializeHealthcareTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - StringIndexType? stringIndexType = default; - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new HealthcareTaskParameters(loggingOptOut, modelVersion, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new HealthcareTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeHealthcareTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.cs index fa8923ccbc35..f4c0084851b8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/HealthcareTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Healthcare task. - internal partial class HealthcareTaskParameters : PreBuiltTaskParameters + internal partial class HealthcareTaskParameters { /// Initializes a new instance of . public HealthcareTaskParameters() @@ -16,15 +16,21 @@ public HealthcareTaskParameters() } /// Initializes a new instance of . - /// - /// - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal HealthcareTaskParameters(bool? loggingOptOut, string modelVersion, StringIndexType? stringIndexType) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + /// Specifies the method used to interpret string offsets. + internal HealthcareTaskParameters(bool? loggingOptOut, string modelVersion, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; StringIndexType = stringIndexType; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Specifies the method used to interpret string offsets. public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorCode.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorCode.cs index 75a48383178c..e4a1e126c629 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorCode.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorCode.cs @@ -37,33 +37,33 @@ public InnerErrorCode(string value) private const string UnsupportedLanguageCodeValue = "UnsupportedLanguageCode"; private const string InvalidCountryHintValue = "InvalidCountryHint"; - /// InvalidRequest. + /// Invalid request error. public static InnerErrorCode InvalidRequest { get; } = new InnerErrorCode(InvalidRequestValue); - /// InvalidParameterValue. + /// Invalid parameter value error. public static InnerErrorCode InvalidParameterValue { get; } = new InnerErrorCode(InvalidParameterValueValue); - /// KnowledgeBaseNotFound. + /// Knowledge base not found error. public static InnerErrorCode KnowledgeBaseNotFound { get; } = new InnerErrorCode(KnowledgeBaseNotFoundValue); - /// AzureCognitiveSearchNotFound. + /// Azure Cognitive Search not found error. public static InnerErrorCode AzureCognitiveSearchNotFound { get; } = new InnerErrorCode(AzureCognitiveSearchNotFoundValue); - /// AzureCognitiveSearchThrottling. + /// Azure Cognitive Search throttling error. public static InnerErrorCode AzureCognitiveSearchThrottling { get; } = new InnerErrorCode(AzureCognitiveSearchThrottlingValue); - /// ExtractionFailure. + /// Extraction failure error. public static InnerErrorCode ExtractionFailure { get; } = new InnerErrorCode(ExtractionFailureValue); - /// InvalidRequestBodyFormat. + /// Invalid request body format error. public static InnerErrorCode InvalidRequestBodyFormat { get; } = new InnerErrorCode(InvalidRequestBodyFormatValue); - /// EmptyRequest. + /// Empty request error. public static InnerErrorCode EmptyRequest { get; } = new InnerErrorCode(EmptyRequestValue); - /// MissingInputDocuments. + /// Missing input documents error. public static InnerErrorCode MissingInputDocuments { get; } = new InnerErrorCode(MissingInputDocumentsValue); - /// InvalidDocument. + /// Invalid document error. public static InnerErrorCode InvalidDocument { get; } = new InnerErrorCode(InvalidDocumentValue); - /// ModelVersionIncorrect. + /// Model version incorrect error. public static InnerErrorCode ModelVersionIncorrect { get; } = new InnerErrorCode(ModelVersionIncorrectValue); - /// InvalidDocumentBatch. + /// Invalid document batch error. public static InnerErrorCode InvalidDocumentBatch { get; } = new InnerErrorCode(InvalidDocumentBatchValue); - /// UnsupportedLanguageCode. + /// Unsupported language code error. public static InnerErrorCode UnsupportedLanguageCode { get; } = new InnerErrorCode(UnsupportedLanguageCodeValue); - /// InvalidCountryHint. + /// Invalid country hint error. public static InnerErrorCode InvalidCountryHint { get; } = new InnerErrorCode(InvalidCountryHintValue); /// Determines if two values are the same. public static bool operator ==(InnerErrorCode left, InnerErrorCode right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.Serialization.cs index 56144a60ae57..6a14f433c52e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.Serialization.cs @@ -7,43 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class InnerErrorModel : IUtf8JsonSerializable + internal partial class InnerErrorModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - if (Optional.IsCollectionDefined(Details)) - { - writer.WritePropertyName("details"u8); - writer.WriteStartObject(); - foreach (var item in Details) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Innererror)) - { - writer.WritePropertyName("innererror"u8); - writer.WriteObjectValue(Innererror); - } - writer.WriteEndObject(); - } - internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -52,7 +20,7 @@ internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element) } InnerErrorCode code = default; string message = default; - IDictionary details = default; + IReadOnlyDictionary details = default; string target = default; InnerErrorModel innererror = default; foreach (var property in element.EnumerateObject()) @@ -106,13 +74,5 @@ internal static InnerErrorModel FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeInnerErrorModel(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.cs index 14db7cffe467..c58ce7c62375 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/InnerErrorModel.cs @@ -17,7 +17,7 @@ internal partial class InnerErrorModel /// One of a server-defined set of error codes. /// Error message. /// is null. - public InnerErrorModel(InnerErrorCode code, string message) + internal InnerErrorModel(InnerErrorCode code, string message) { Argument.AssertNotNull(message, nameof(message)); @@ -32,7 +32,7 @@ public InnerErrorModel(InnerErrorCode code, string message) /// Error details. /// Error target. /// An object containing more specific information than the current object about the error. - internal InnerErrorModel(InnerErrorCode code, string message, IDictionary details, string target, InnerErrorModel innererror) + internal InnerErrorModel(InnerErrorCode code, string message, IReadOnlyDictionary details, string target, InnerErrorModel innererror) { Code = code; Message = message; @@ -42,14 +42,14 @@ internal InnerErrorModel(InnerErrorCode code, string message, IDictionary One of a server-defined set of error codes. - public InnerErrorCode Code { get; set; } + public InnerErrorCode Code { get; } /// Error message. - public string Message { get; set; } + public string Message { get; } /// Error details. - public IDictionary Details { get; } + public IReadOnlyDictionary Details { get; } /// Error target. - public string Target { get; set; } + public string Target { get; } /// An object containing more specific information than the current object about the error. - public InnerErrorModel Innererror { get; set; } + public InnerErrorModel Innererror { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobErrors.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobErrors.cs deleted file mode 100644 index d000ff1df73c..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobErrors.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The JobErrors. - internal partial class JobErrors - { - /// Initializes a new instance of . - internal JobErrors() - { - Errors = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - internal JobErrors(IReadOnlyList errors) - { - Errors = errors; - } - - /// Gets the errors. - public IReadOnlyList Errors { get; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobState.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobState.Serialization.cs deleted file mode 100644 index 5a946ceda3e8..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobState.Serialization.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class JobState - { - internal static JobState DeserializeJobState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string displayName = default; - DateTimeOffset createdDateTime = default; - DateTimeOffset? expirationDateTime = default; - string jobId = default; - DateTimeOffset lastUpdatedDateTime = default; - TextAnalyticsOperationStatus status = default; - IReadOnlyList errors = default; - string nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdDateTime"u8)) - { - createdDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("expirationDateTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expirationDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("jobId"u8)) - { - jobId = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastUpdatedDateTime"u8)) - { - lastUpdatedDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("errors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Error.DeserializeError(item)); - } - errors = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new JobState( - displayName, - createdDateTime, - expirationDateTime, - jobId, - lastUpdatedDateTime, - status, - errors ?? new ChangeTrackingList(), - nextLink); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static JobState FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeJobState(document.RootElement); - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobState.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobState.cs deleted file mode 100644 index 3c49287162cb..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/JobState.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The JobState. - internal partial class JobState - { - /// Initializes a new instance of . - /// - /// - /// - /// - /// is null. - internal JobState(DateTimeOffset createdDateTime, string jobId, DateTimeOffset lastUpdatedDateTime, TextAnalyticsOperationStatus status) - { - Argument.AssertNotNull(jobId, nameof(jobId)); - - CreatedDateTime = createdDateTime; - JobId = jobId; - LastUpdatedDateTime = lastUpdatedDateTime; - Status = status; - Errors = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - internal JobState(string displayName, DateTimeOffset createdDateTime, DateTimeOffset? expirationDateTime, string jobId, DateTimeOffset lastUpdatedDateTime, TextAnalyticsOperationStatus status, IReadOnlyList errors, string nextLink) - { - DisplayName = displayName; - CreatedDateTime = createdDateTime; - ExpirationDateTime = expirationDateTime; - JobId = jobId; - LastUpdatedDateTime = lastUpdatedDateTime; - Status = status; - Errors = errors; - NextLink = nextLink; - } - - /// Gets the display name. - public string DisplayName { get; } - /// Gets the created date time. - public DateTimeOffset CreatedDateTime { get; } - /// Gets the expiration date time. - public DateTimeOffset? ExpirationDateTime { get; } - /// Gets the job id. - public string JobId { get; } - /// Gets the last updated date time. - public DateTimeOffset LastUpdatedDateTime { get; } - /// Gets the status. - public TextAnalyticsOperationStatus Status { get; } - /// Gets the errors. - public IReadOnlyList Errors { get; } - /// Gets the next link. - public string NextLink { get; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.Serialization.cs index 4707ac690712..391531baf2d2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class KeyPhraseExtractionLROResult : IUtf8JsonSerializable + internal partial class KeyPhraseExtractionLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static KeyPhraseExtractionLROResult DeserializeKeyPhraseExtractionLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static KeyPhraseExtractionLROResult DeserializeKeyPhraseExtractionLRORe return null; } KeyPhraseResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static KeyPhraseExtractionLROResult DeserializeKeyPhraseExtractionLRORe results = KeyPhraseResult.DeserializeKeyPhraseResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new KeyPhraseExtractionLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new KeyPhraseExtractionLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static KeyPhraseExtractionLROResult DeserializeKeyPhraseExtractionLRORe using var document = JsonDocument.Parse(response.Content); return DeserializeKeyPhraseExtractionLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.cs index 0495e8e0d39c..e5dd728041ef 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseExtractionLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The KeyPhraseExtractionLROResult. + /// Contains the analyze text KeyPhraseExtraction LRO task. internal partial class KeyPhraseExtractionLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// The list of Key phrase extraction results. /// is null. - public KeyPhraseExtractionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, KeyPhraseResult results) : base(lastUpdateDateTime, status) + internal KeyPhraseExtractionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, KeyPhraseResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public KeyPhraseExtractionLROResult(DateTimeOffset lastUpdateDateTime, TextAnaly } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal KeyPhraseExtractionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, KeyPhraseResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// The list of Key phrase extraction results. + internal KeyPhraseExtractionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, KeyPhraseResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public KeyPhraseResult Results { get; set; } + /// The list of Key phrase extraction results. + public KeyPhraseResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.Serialization.cs index 9a18b1cdec2c..7c3df0a2da3f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static KeyPhraseLROTask DeserializeKeyPhraseLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - KeyPhraseTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = KeyPhraseTaskParameters.DeserializeKeyPhraseTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new KeyPhraseLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new KeyPhraseLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeKeyPhraseLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.cs index 3eefccf80f41..902348de6166 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseLROTask.cs @@ -17,16 +17,16 @@ public KeyPhraseLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a Key Phrase Extraction task. + /// task name. + /// The kind of task to perform. + /// Key phrase extraction task parameters. internal KeyPhraseLROTask(string taskName, AnalyzeTextLROTaskKind kind, KeyPhraseTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a Key Phrase Extraction task. + /// Key phrase extraction task parameters. public KeyPhraseTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.Serialization.cs index 87a229594758..96986895ab3d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class KeyPhraseResult : IUtf8JsonSerializable + internal partial class KeyPhraseResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static KeyPhraseResult DeserializeKeyPhraseResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(KeyPhraseResultDocumentsItem.DeserializeKeyPhraseResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static KeyPhraseResult DeserializeKeyPhraseResult(JsonElement element) modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KeyPhrasesDocumentResult.DeserializeKeyPhrasesDocumentResult(item)); + } + documents = array; + continue; + } } return new KeyPhraseResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new KeyPhraseResult FromResponse(Response response) + internal static KeyPhraseResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeKeyPhraseResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.cs index be4b64fa6a23..e44cbe2ea1c0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The KeyPhraseResult. - internal partial class KeyPhraseResult : PreBuiltResult + /// Contains the KeyPhraseResult. + internal partial class KeyPhraseResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - public KeyPhraseResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal KeyPhraseResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -33,12 +35,21 @@ public KeyPhraseResult(IEnumerable errors, string modelVersion, I /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - internal KeyPhraseResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + internal KeyPhraseResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } /// Response by document. - public IList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResultDocumentsItem.Serialization.cs deleted file mode 100644 index 43f521b57ded..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class KeyPhraseResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyPhrases"u8); - writer.WriteStartArray(); - foreach (var item in KeyPhrases) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static KeyPhraseResultDocumentsItem DeserializeKeyPhraseResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList keyPhrases = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keyPhrases"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - keyPhrases = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new KeyPhraseResultDocumentsItem(id, warnings, statistics, keyPhrases); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new KeyPhraseResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeKeyPhraseResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResultDocumentsItem.cs deleted file mode 100644 index 8fd9f64c8038..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseResultDocumentsItem.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The KeyPhraseResultDocumentsItem. - internal partial class KeyPhraseResultDocumentsItem : KeyPhrasesDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - /// , or is null. - public KeyPhraseResultDocumentsItem(string id, IEnumerable warnings, IEnumerable keyPhrases) : base(id, warnings, keyPhrases) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(keyPhrases, nameof(keyPhrases)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - internal KeyPhraseResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList keyPhrases) : base(id, warnings, statistics, keyPhrases) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.Serialization.cs index 781004f9a279..8533f567e7c0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.Serialization.cs @@ -15,57 +15,21 @@ internal partial class KeyPhraseTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); writer.WriteBooleanValue(LoggingOptOut.Value); } - writer.WriteEndObject(); - } - - internal static KeyPhraseTaskParameters DeserializeKeyPhraseTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) + if (Optional.IsDefined(ModelVersion)) { - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); } - return new KeyPhraseTaskParameters(loggingOptOut, modelVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new KeyPhraseTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeKeyPhraseTaskParameters(document.RootElement); + writer.WriteEndObject(); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.cs index 2f6e46625b59..9914ada47ea7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Key Phrase Extraction task. - internal partial class KeyPhraseTaskParameters : PreBuiltTaskParameters + internal partial class KeyPhraseTaskParameters { /// Initializes a new instance of . public KeyPhraseTaskParameters() @@ -16,10 +16,17 @@ public KeyPhraseTaskParameters() } /// Initializes a new instance of . - /// - /// - internal KeyPhraseTaskParameters(bool? loggingOptOut, string modelVersion) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + internal KeyPhraseTaskParameters(bool? loggingOptOut, string modelVersion) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; } + + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskResult.cs index ad15c30cbf9d..297f599ca320 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhraseTaskResult.cs @@ -9,11 +9,11 @@ namespace Azure.AI.TextAnalytics.Models { - /// The KeyPhraseTaskResult. + /// Contains the analyze text KeyPhraseExtraction task result. internal partial class KeyPhraseTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// + /// The list of Key phrase extraction results. /// is null. internal KeyPhraseTaskResult(KeyPhraseResult results) { @@ -24,15 +24,15 @@ internal KeyPhraseTaskResult(KeyPhraseResult results) } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. - /// + /// The kind of task result. + /// The list of Key phrase extraction results. internal KeyPhraseTaskResult(AnalyzeTextTaskResultsKind kind, KeyPhraseResult results) : base(kind) { Results = results; Kind = kind; } - /// Gets the results. + /// The list of Key phrase extraction results. public KeyPhraseResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.Serialization.cs index 8998948837e0..e9e7c069f0c9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class KeyPhrasesDocumentResult : IUtf8JsonSerializable + internal partial class KeyPhrasesDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyPhrases"u8); - writer.WriteStartArray(); - foreach (var item in KeyPhrases) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static KeyPhrasesDocumentResult DeserializeKeyPhrasesDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList keyPhrases = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList keyPhrases = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("keyPhrases"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - keyPhrases = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -86,24 +48,26 @@ internal static KeyPhrasesDocumentResult DeserializeKeyPhrasesDocumentResult(Jso statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("keyPhrases"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + keyPhrases = array; + continue; + } } return new KeyPhrasesDocumentResult(id, warnings, statistics, keyPhrases); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new KeyPhrasesDocumentResult FromResponse(Response response) + internal static KeyPhrasesDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeKeyPhrasesDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.cs index 27028fba1dc9..7016316f01b7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/KeyPhrasesDocumentResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The KeyPhrasesDocumentResult. - internal partial class KeyPhrasesDocumentResult : DocumentResult + /// Contains the Key phrase extraction results for a document. + internal partial class KeyPhrasesDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. /// , or is null. - public KeyPhrasesDocumentResult(string id, IEnumerable warnings, IEnumerable keyPhrases) : base(id, warnings) + internal KeyPhrasesDocumentResult(string id, IEnumerable warnings, IEnumerable keyPhrases) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(keyPhrases, nameof(keyPhrases)); + Id = id; + Warnings = warnings.ToList(); KeyPhrases = keyPhrases.ToList(); } @@ -33,12 +35,21 @@ public KeyPhrasesDocumentResult(string id, IEnumerable warnings /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - internal KeyPhrasesDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList keyPhrases) : base(id, warnings, statistics) + internal KeyPhrasesDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList keyPhrases) { + Id = id; + Warnings = warnings; + Statistics = statistics; KeyPhrases = keyPhrases; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - public IList KeyPhrases { get; } + public IReadOnlyList KeyPhrases { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionAnalysisInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionAnalysisInput.cs index 07c2d5d4862c..434edbe48383 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionAnalysisInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionAnalysisInput.cs @@ -9,7 +9,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The LanguageDetectionAnalysisInput. + /// Contains the language detection document analysis input. internal partial class LanguageDetectionAnalysisInput { /// Initializes a new instance of . @@ -19,13 +19,13 @@ public LanguageDetectionAnalysisInput() } /// Initializes a new instance of . - /// + /// List of documents to be analyzed. internal LanguageDetectionAnalysisInput(IList documents) { Documents = documents; } - /// Gets the documents. + /// List of documents to be analyzed. public IList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.Serialization.cs index 67a7e4b678ee..0407221003f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.Serialization.cs @@ -7,51 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class LanguageDetectionDocumentResult : IUtf8JsonSerializable + internal partial class LanguageDetectionDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("detectedLanguage"u8); - writer.WriteObjectValue(DetectedLanguage); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static LanguageDetectionDocumentResult DeserializeLanguageDetectionDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - DetectedLanguageInternal detectedLanguage = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + DetectedLanguageInternal detectedLanguage = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("detectedLanguage"u8)) - { - detectedLanguage = DetectedLanguageInternal.DeserializeDetectedLanguageInternal(property.Value); - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -76,24 +48,21 @@ internal static LanguageDetectionDocumentResult DeserializeLanguageDetectionDocu statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("detectedLanguage"u8)) + { + detectedLanguage = DetectedLanguageInternal.DeserializeDetectedLanguageInternal(property.Value); + continue; + } } return new LanguageDetectionDocumentResult(id, warnings, statistics, detectedLanguage); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new LanguageDetectionDocumentResult FromResponse(Response response) + internal static LanguageDetectionDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeLanguageDetectionDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.cs index 4634a8485eed..7931800b922d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionDocumentResult.cs @@ -7,22 +7,25 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.AI.TextAnalytics.Models { - /// The LanguageDetectionDocumentResult. - internal partial class LanguageDetectionDocumentResult : DocumentResult + /// Contains the language detection for a document. + internal partial class LanguageDetectionDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// Detected Language. /// or is null. - public LanguageDetectionDocumentResult(string id, IEnumerable warnings, DetectedLanguageInternal detectedLanguage) : base(id, warnings) + internal LanguageDetectionDocumentResult(string id, IEnumerable warnings, DetectedLanguageInternal detectedLanguage) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); + Id = id; + Warnings = warnings.ToList(); DetectedLanguage = detectedLanguage; } @@ -31,12 +34,21 @@ public LanguageDetectionDocumentResult(string id, IEnumerable w /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Detected Language. - internal LanguageDetectionDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, DetectedLanguageInternal detectedLanguage) : base(id, warnings, statistics) + internal LanguageDetectionDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, DetectedLanguageInternal detectedLanguage) { + Id = id; + Warnings = warnings; + Statistics = statistics; DetectedLanguage = detectedLanguage; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// Detected Language. - public DetectedLanguageInternal DetectedLanguage { get; set; } + public DetectedLanguageInternal DetectedLanguage { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.Serialization.cs index 7c6064b09af8..65c4797bd555 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class LanguageDetectionResult : IUtf8JsonSerializable + internal partial class LanguageDetectionResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static LanguageDetectionResult DeserializeLanguageDetectionResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LanguageDetectionDocumentResult.DeserializeLanguageDetectionDocumentResult(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static LanguageDetectionResult DeserializeLanguageDetectionResult(JsonE modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LanguageDetectionDocumentResult.DeserializeLanguageDetectionDocumentResult(item)); + } + documents = array; + continue; + } } return new LanguageDetectionResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new LanguageDetectionResult FromResponse(Response response) + internal static LanguageDetectionResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeLanguageDetectionResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.cs index e4093356bfc1..9e22b7df2601 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The LanguageDetectionResult. - internal partial class LanguageDetectionResult : PreBuiltResult + /// Contains the language detection result for the request. + internal partial class LanguageDetectionResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. - /// Response by document. + /// Enumeration of language detection results for each input document. /// , or is null. - public LanguageDetectionResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal LanguageDetectionResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -32,13 +34,22 @@ public LanguageDetectionResult(IEnumerable errors, string modelVe /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. - /// Response by document. - internal LanguageDetectionResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + /// Enumeration of language detection results for each input document. + internal LanguageDetectionResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } - /// Response by document. - public IList Documents { get; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } + /// Enumeration of language detection results for each input document. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.Serialization.cs index d89965fe92e2..06a8a295ed49 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.Serialization.cs @@ -15,57 +15,21 @@ internal partial class LanguageDetectionTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); writer.WriteBooleanValue(LoggingOptOut.Value); } - writer.WriteEndObject(); - } - - internal static LanguageDetectionTaskParameters DeserializeLanguageDetectionTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) + if (Optional.IsDefined(ModelVersion)) { - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); } - return new LanguageDetectionTaskParameters(loggingOptOut, modelVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new LanguageDetectionTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeLanguageDetectionTaskParameters(document.RootElement); + writer.WriteEndObject(); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.cs index 59805e47ffac..704b7e30d4d6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Language Detection task. - internal partial class LanguageDetectionTaskParameters : PreBuiltTaskParameters + internal partial class LanguageDetectionTaskParameters { /// Initializes a new instance of . public LanguageDetectionTaskParameters() @@ -16,10 +16,17 @@ public LanguageDetectionTaskParameters() } /// Initializes a new instance of . - /// - /// - internal LanguageDetectionTaskParameters(bool? loggingOptOut, string modelVersion) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + internal LanguageDetectionTaskParameters(bool? loggingOptOut, string modelVersion) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; } + + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskResult.cs index 6818652cc988..deb049dca54f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageDetectionTaskResult.cs @@ -9,11 +9,11 @@ namespace Azure.AI.TextAnalytics.Models { - /// The LanguageDetectionTaskResult. + /// Contains the language detection task result for the request. internal partial class LanguageDetectionTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// + /// Contains the language detection results. /// is null. internal LanguageDetectionTaskResult(LanguageDetectionResult results) { @@ -24,15 +24,15 @@ internal LanguageDetectionTaskResult(LanguageDetectionResult results) } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. - /// + /// The kind of task result. + /// Contains the language detection results. internal LanguageDetectionTaskResult(AnalyzeTextTaskResultsKind kind, LanguageDetectionResult results) : base(kind) { Results = results; Kind = kind; } - /// Gets the results. + /// Contains the language detection results. public LanguageDetectionResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageInput.cs index fb2c67168827..96888c6691fc 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LanguageInput.cs @@ -7,12 +7,12 @@ namespace Azure.AI.TextAnalytics.Models { - /// The LanguageInput. + /// Contains the language detection input. internal partial class LanguageInput { /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// + /// A unique, non-empty document identifier. + /// The input text to process. public LanguageInput(string id, string text) { Id = id; @@ -20,9 +20,9 @@ public LanguageInput(string id, string text) } /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// - /// + /// A unique, non-empty document identifier. + /// The input text to process. + /// The country hint to help with language detection of the text. internal LanguageInput(string id, string text, string countryHint) { Id = id; @@ -30,11 +30,11 @@ internal LanguageInput(string id, string text, string countryHint) CountryHint = countryHint; } - /// Unique, non-empty document identifier. + /// A unique, non-empty document identifier. public string Id { get; } - /// Gets the text. + /// The input text to process. public string Text { get; } - /// Gets or sets the country hint. + /// The country hint to help with language detection of the text. public string CountryHint { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.Serialization.cs index 785a0b775096..0de3528c8f1e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class LinkedEntitiesDocumentResult : IUtf8JsonSerializable + internal partial class LinkedEntitiesDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static LinkedEntitiesDocumentResult DeserializeLinkedEntitiesDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList entities = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + IReadOnlyList entities = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LinkedEntity.DeserializeLinkedEntity(item)); - } - entities = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -86,24 +48,26 @@ internal static LinkedEntitiesDocumentResult DeserializeLinkedEntitiesDocumentRe statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LinkedEntity.DeserializeLinkedEntity(item)); + } + entities = array; + continue; + } } return new LinkedEntitiesDocumentResult(id, warnings, statistics, entities); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new LinkedEntitiesDocumentResult FromResponse(Response response) + internal static LinkedEntitiesDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeLinkedEntitiesDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.cs index 424d0a3f02bf..8fefd4d13cad 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntitiesDocumentResult.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The LinkedEntitiesDocumentResult. - internal partial class LinkedEntitiesDocumentResult : DocumentResult + /// Entity linking document result. + internal partial class LinkedEntitiesDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// Recognized well known entities in the document. /// , or is null. - public LinkedEntitiesDocumentResult(string id, IEnumerable warnings, IEnumerable entities) : base(id, warnings) + internal LinkedEntitiesDocumentResult(string id, IEnumerable warnings, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(entities, nameof(entities)); + Id = id; + Warnings = warnings.ToList(); Entities = entities.ToList(); } @@ -33,12 +35,21 @@ public LinkedEntitiesDocumentResult(string id, IEnumerable warn /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Recognized well known entities in the document. - internal LinkedEntitiesDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList entities) : base(id, warnings, statistics) + internal LinkedEntitiesDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, IReadOnlyList entities) { + Id = id; + Warnings = warnings; + Statistics = statistics; Entities = entities; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// Recognized well known entities in the document. - public IList Entities { get; } + public IReadOnlyList Entities { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.Serialization.cs index 7b13319e23d4..dee74d102e1b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.Serialization.cs @@ -8,43 +8,11 @@ using System; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics { - public partial struct LinkedEntity : IUtf8JsonSerializable + public partial struct LinkedEntity { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("matches"u8); - writer.WriteStartArray(); - foreach (var item in Matches) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("language"u8); - writer.WriteStringValue(Language); - if (Optional.IsDefined(DataSourceEntityId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(DataSourceEntityId); - } - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url.AbsoluteUri); - writer.WritePropertyName("dataSource"u8); - writer.WriteStringValue(DataSource); - if (Optional.IsDefined(BingEntitySearchApiId)) - { - writer.WritePropertyName("bingId"u8); - writer.WriteStringValue(BingEntitySearchApiId); - } - writer.WriteEndObject(); - } - internal static LinkedEntity DeserializeLinkedEntity(JsonElement element) { string name = default; @@ -114,13 +82,5 @@ internal static LinkedEntity FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeLinkedEntity(document.RootElement); } - - /// Convert into a . - internal RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.cs index 9778691e8590..a361b623b453 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntity.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics { - /// The LinkedEntity. + /// The LinkedEntity object containing the detected entity with the associated sources/links. public readonly partial struct LinkedEntity { } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.Serialization.cs index c21939075e3b..27b9d15b17ca 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.Serialization.cs @@ -6,26 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics { - public partial struct LinkedEntityMatch : IUtf8JsonSerializable + public partial struct LinkedEntityMatch { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("confidenceScore"u8); - writer.WriteNumberValue(ConfidenceScore); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WriteEndObject(); - } - internal static LinkedEntityMatch DeserializeLinkedEntityMatch(JsonElement element) { double confidenceScore = default; @@ -65,13 +50,5 @@ internal static LinkedEntityMatch FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeLinkedEntityMatch(document.RootElement); } - - /// Convert into a . - internal RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.cs index bd4359681535..890cd4598bf3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/LinkedEntityMatch.cs @@ -9,7 +9,7 @@ namespace Azure.AI.TextAnalytics { - /// The Match. + /// The Match object containing the detected entity text with the offset and the length. public readonly partial struct LinkedEntityMatch { } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageAnalysisInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageAnalysisInput.cs index 66d3dbeb8d49..7faca36a6cb7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageAnalysisInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageAnalysisInput.cs @@ -9,7 +9,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The MultiLanguageAnalysisInput. + /// Collection of input documents to be analyzed by the service. internal partial class MultiLanguageAnalysisInput { /// Initializes a new instance of . @@ -19,13 +19,13 @@ public MultiLanguageAnalysisInput() } /// Initializes a new instance of . - /// + /// The input documents to be analyzed. internal MultiLanguageAnalysisInput(IList documents) { Documents = documents; } - /// Gets the documents. + /// The input documents to be analyzed. public IList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageInput.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageInput.cs index aec998c4fee6..e453f3e4477a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageInput.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/MultiLanguageInput.cs @@ -22,7 +22,7 @@ public MultiLanguageInput(string id, string text) /// Initializes a new instance of . /// A unique, non-empty document identifier. /// The input text to process. - /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. + /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use \"auto\". If not set, use \"en\" for English as default. internal MultiLanguageInput(string id, string text, string language) { Id = id; @@ -34,7 +34,7 @@ internal MultiLanguageInput(string id, string text, string language) public string Id { get; } /// The input text to process. public string Text { get; } - /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. + /// (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use \"auto\". If not set, use \"en\" for English as default. public string Language { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Pagination.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Pagination.cs deleted file mode 100644 index e6624237d38e..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Pagination.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// The Pagination. - internal partial class Pagination - { - /// Initializes a new instance of . - internal Pagination() - { - } - - /// Initializes a new instance of . - /// - internal Pagination(string nextLink) - { - NextLink = nextLink; - } - - /// Gets the next link. - public string NextLink { get; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiDomain.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiDomain.cs index 08b08b97cb36..29f886d4b538 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiDomain.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiDomain.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// The PII domain used for PII Entity Recognition. + /// Domain for PII task. internal readonly partial struct PiiDomain : IEquatable { private readonly string _value; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.Serialization.cs index 1fef163b5813..239f1af34b71 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.Serialization.cs @@ -7,69 +7,24 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class PiiEntitiesDocumentResult : IUtf8JsonSerializable + internal partial class PiiEntitiesDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("redactedText"u8); - writer.WriteStringValue(RedactedText); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static PiiEntitiesDocumentResult DeserializePiiEntitiesDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - string redactedText = default; - IList entities = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + string redactedText = default; + IReadOnlyList entities = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("redactedText"u8)) - { - redactedText = property.Value.GetString(); - continue; - } - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Entity.DeserializeEntity(item)); - } - entities = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -94,24 +49,31 @@ internal static PiiEntitiesDocumentResult DeserializePiiEntitiesDocumentResult(J statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("redactedText"u8)) + { + redactedText = property.Value.GetString(); + continue; + } + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Entity.DeserializeEntity(item)); + } + entities = array; + continue; + } } return new PiiEntitiesDocumentResult(id, warnings, statistics, redactedText, entities); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new PiiEntitiesDocumentResult FromResponse(Response response) + internal static PiiEntitiesDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializePiiEntitiesDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.cs index 60f03b9349c0..7afd45282fcf 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesDocumentResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.TextAnalytics.Models { - /// The PiiEntitiesDocumentResult. - internal partial class PiiEntitiesDocumentResult : DocumentResult + /// Contains the PII results. + internal partial class PiiEntitiesDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. @@ -20,13 +20,15 @@ internal partial class PiiEntitiesDocumentResult : DocumentResult /// Returns redacted text. /// Recognized entities in the document. /// , , or is null. - public PiiEntitiesDocumentResult(string id, IEnumerable warnings, string redactedText, IEnumerable entities) : base(id, warnings) + internal PiiEntitiesDocumentResult(string id, IEnumerable warnings, string redactedText, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(redactedText, nameof(redactedText)); Argument.AssertNotNull(entities, nameof(entities)); + Id = id; + Warnings = warnings.ToList(); RedactedText = redactedText; Entities = entities.ToList(); } @@ -37,15 +39,24 @@ public PiiEntitiesDocumentResult(string id, IEnumerable warning /// if showStats=true was specified in the request this field will contain information about the document payload. /// Returns redacted text. /// Recognized entities in the document. - internal PiiEntitiesDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, string redactedText, IList entities) : base(id, warnings, statistics) + internal PiiEntitiesDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, string redactedText, IReadOnlyList entities) { + Id = id; + Warnings = warnings; + Statistics = statistics; RedactedText = redactedText; Entities = entities; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// Returns redacted text. - public string RedactedText { get; set; } + public string RedactedText { get; } /// Recognized entities in the document. - public IList Entities { get; } + public IReadOnlyList Entities { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.Serialization.cs index 0a21a9c0693e..f5ba7b2d02c2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.Serialization.cs @@ -8,61 +8,23 @@ using System.Collections.Generic; using System.Text.Json; using Azure.AI.TextAnalytics.Models; -using Azure.Core; namespace Azure.AI.TextAnalytics { - internal partial class PiiEntitiesResult : IUtf8JsonSerializable + internal partial class PiiEntitiesResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static PiiEntitiesResult DeserializePiiEntitiesResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PiiResultDocumentsItem.DeserializePiiResultDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -87,24 +49,26 @@ internal static PiiEntitiesResult DeserializePiiEntitiesResult(JsonElement eleme modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PiiEntitiesDocumentResult.DeserializePiiEntitiesDocumentResult(item)); + } + documents = array; + continue; + } } return new PiiEntitiesResult(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new PiiEntitiesResult FromResponse(Response response) + internal static PiiEntitiesResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializePiiEntitiesResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.cs index ca87d6353d0f..49a08ff413c6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntitiesResult.cs @@ -12,20 +12,22 @@ namespace Azure.AI.TextAnalytics { - /// The PiiResult. - internal partial class PiiEntitiesResult : PreBuiltResult + /// Contains the PiiResult. + internal partial class PiiEntitiesResult { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - public PiiEntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal PiiEntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -34,12 +36,21 @@ public PiiEntitiesResult(IEnumerable errors, string modelVersion, /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - internal PiiEntitiesResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + internal PiiEntitiesResult(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } /// Response by document. - public IList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityCategory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityCategory.cs index 4197341f674c..d923144968eb 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityCategory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityCategory.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics { - /// The PiiCategory. + /// (Optional) describes the PII categories to return. public readonly partial struct PiiEntityCategory : IEquatable { private readonly string _value; @@ -196,329 +196,329 @@ public PiiEntityCategory(string value) private const string AllValue = "All"; private const string DefaultValue = "Default"; - /// ABARoutingNumber. + /// ABA Routing number. public static PiiEntityCategory ABARoutingNumber { get; } = new PiiEntityCategory(ABARoutingNumberValue); - /// ARNationalIdentityNumber. + /// AR National Identity Number. public static PiiEntityCategory ARNationalIdentityNumber { get; } = new PiiEntityCategory(ARNationalIdentityNumberValue); - /// AUBankAccountNumber. + /// AT Identity Card. public static PiiEntityCategory AUBankAccountNumber { get; } = new PiiEntityCategory(AUBankAccountNumberValue); - /// AUDriversLicenseNumber. + /// AU Driver's License Number. public static PiiEntityCategory AUDriversLicenseNumber { get; } = new PiiEntityCategory(AUDriversLicenseNumberValue); - /// AUMedicalAccountNumber. + /// AU Medical Account Number. public static PiiEntityCategory AUMedicalAccountNumber { get; } = new PiiEntityCategory(AUMedicalAccountNumberValue); - /// AUPassportNumber. + /// AU Passport Number. public static PiiEntityCategory AUPassportNumber { get; } = new PiiEntityCategory(AUPassportNumberValue); - /// AUTaxFileNumber. + /// AU Tax File Number. public static PiiEntityCategory AUTaxFileNumber { get; } = new PiiEntityCategory(AUTaxFileNumberValue); - /// AUBusinessNumber. + /// AU Business Number. public static PiiEntityCategory AUBusinessNumber { get; } = new PiiEntityCategory(AUBusinessNumberValue); - /// AUCompanyNumber. + /// AU Company Number. public static PiiEntityCategory AUCompanyNumber { get; } = new PiiEntityCategory(AUCompanyNumberValue); - /// ATIdentityCard. + /// AT Identity Card. public static PiiEntityCategory ATIdentityCard { get; } = new PiiEntityCategory(ATIdentityCardValue); - /// ATTaxIdentificationNumber. + /// AT Tax Identification Number. public static PiiEntityCategory ATTaxIdentificationNumber { get; } = new PiiEntityCategory(ATTaxIdentificationNumberValue); - /// ATValueAddedTaxNumber. + /// AT Value Added Tax Number. public static PiiEntityCategory ATValueAddedTaxNumber { get; } = new PiiEntityCategory(ATValueAddedTaxNumberValue); - /// AzureDocumentDBAuthKey. + /// Azure Document DB Auth Key. public static PiiEntityCategory AzureDocumentDBAuthKey { get; } = new PiiEntityCategory(AzureDocumentDBAuthKeyValue); - /// AzureIAASDatabaseConnectionAndSQLString. + /// Azure IAAS Database Connection And SQL String. public static PiiEntityCategory AzureIaasDatabaseConnectionAndSQLString { get; } = new PiiEntityCategory(AzureIaasDatabaseConnectionAndSQLStringValue); - /// AzureIoTConnectionString. + /// Azure IoT Connection String. public static PiiEntityCategory AzureIoTConnectionString { get; } = new PiiEntityCategory(AzureIoTConnectionStringValue); - /// AzurePublishSettingPassword. + /// Azure Publish Setting Password. public static PiiEntityCategory AzurePublishSettingPassword { get; } = new PiiEntityCategory(AzurePublishSettingPasswordValue); - /// AzureRedisCacheString. + /// Azure Redis Cache String. public static PiiEntityCategory AzureRedisCacheString { get; } = new PiiEntityCategory(AzureRedisCacheStringValue); - /// AzureSAS. + /// Azure SAS. public static PiiEntityCategory AzureSAS { get; } = new PiiEntityCategory(AzureSASValue); - /// AzureServiceBusString. + /// Azure Service Bus String. public static PiiEntityCategory AzureServiceBusString { get; } = new PiiEntityCategory(AzureServiceBusStringValue); - /// AzureStorageAccountKey. + /// Azure Storage Account Key. public static PiiEntityCategory AzureStorageAccountKey { get; } = new PiiEntityCategory(AzureStorageAccountKeyValue); - /// AzureStorageAccountGeneric. + /// Azure Storage Account Generic. public static PiiEntityCategory AzureStorageAccountGeneric { get; } = new PiiEntityCategory(AzureStorageAccountGenericValue); - /// BENationalNumber. + /// BE National Number. public static PiiEntityCategory BENationalNumber { get; } = new PiiEntityCategory(BENationalNumberValue); - /// BENationalNumberV2. + /// BE National Number V2. public static PiiEntityCategory BENationalNumberV2 { get; } = new PiiEntityCategory(BENationalNumberV2Value); - /// BEValueAddedTaxNumber. + /// BE Value Added Tax Number. public static PiiEntityCategory BEValueAddedTaxNumber { get; } = new PiiEntityCategory(BEValueAddedTaxNumberValue); - /// BRCPFNumber. + /// BR CPF Number. public static PiiEntityCategory BrcpfNumber { get; } = new PiiEntityCategory(BrcpfNumberValue); - /// BRLegalEntityNumber. + /// BR Legal Entity Number. public static PiiEntityCategory BRLegalEntityNumber { get; } = new PiiEntityCategory(BRLegalEntityNumberValue); - /// BRNationalIDRG. + /// BR National ID RG. public static PiiEntityCategory BRNationalIdrg { get; } = new PiiEntityCategory(BRNationalIdrgValue); - /// BGUniformCivilNumber. + /// BG Uniform Civil Number. public static PiiEntityCategory BGUniformCivilNumber { get; } = new PiiEntityCategory(BGUniformCivilNumberValue); - /// CABankAccountNumber. + /// CA Bank Account Number. public static PiiEntityCategory CABankAccountNumber { get; } = new PiiEntityCategory(CABankAccountNumberValue); - /// CADriversLicenseNumber. + /// CA Driver's License Number. public static PiiEntityCategory CADriversLicenseNumber { get; } = new PiiEntityCategory(CADriversLicenseNumberValue); - /// CAHealthServiceNumber. + /// CA Health Service Number. public static PiiEntityCategory CAHealthServiceNumber { get; } = new PiiEntityCategory(CAHealthServiceNumberValue); - /// CAPassportNumber. + /// CA Passport Number. public static PiiEntityCategory CAPassportNumber { get; } = new PiiEntityCategory(CAPassportNumberValue); - /// CAPersonalHealthIdentification. + /// CA Personal Health Identification. public static PiiEntityCategory CAPersonalHealthIdentification { get; } = new PiiEntityCategory(CAPersonalHealthIdentificationValue); - /// CASocialInsuranceNumber. + /// CA Social Insurance Number. public static PiiEntityCategory CASocialInsuranceNumber { get; } = new PiiEntityCategory(CASocialInsuranceNumberValue); - /// CLIdentityCardNumber. + /// CL Identity Card Number. public static PiiEntityCategory CLIdentityCardNumber { get; } = new PiiEntityCategory(CLIdentityCardNumberValue); - /// CNResidentIdentityCardNumber. + /// CN Resident Identity Card Number. public static PiiEntityCategory CNResidentIdentityCardNumber { get; } = new PiiEntityCategory(CNResidentIdentityCardNumberValue); - /// CreditCardNumber. + /// Credit Card Number. public static PiiEntityCategory CreditCardNumber { get; } = new PiiEntityCategory(CreditCardNumberValue); - /// HRIdentityCardNumber. + /// HR Identity Card Number. public static PiiEntityCategory HRIdentityCardNumber { get; } = new PiiEntityCategory(HRIdentityCardNumberValue); - /// HRNationalIDNumber. + /// HR National ID Number. public static PiiEntityCategory HRNationalIDNumber { get; } = new PiiEntityCategory(HRNationalIDNumberValue); - /// HRPersonalIdentificationNumber. + /// HR Personal Identification Number. public static PiiEntityCategory HRPersonalIdentificationNumber { get; } = new PiiEntityCategory(HRPersonalIdentificationNumberValue); - /// HRPersonalIdentificationOIBNumberV2. + /// HR Personal Identification OIB Number V2. public static PiiEntityCategory HRPersonalIdentificationOIBNumberV2 { get; } = new PiiEntityCategory(HRPersonalIdentificationOIBNumberV2Value); - /// CYIdentityCard. + /// CY Identity Card. public static PiiEntityCategory CYIdentityCard { get; } = new PiiEntityCategory(CYIdentityCardValue); - /// CYTaxIdentificationNumber. + /// CY Tax Identification Number. public static PiiEntityCategory CYTaxIdentificationNumber { get; } = new PiiEntityCategory(CYTaxIdentificationNumberValue); - /// CZPersonalIdentityNumber. + /// CZ Personal Identity Number. public static PiiEntityCategory CZPersonalIdentityNumber { get; } = new PiiEntityCategory(CZPersonalIdentityNumberValue); - /// CZPersonalIdentityV2. + /// CZ Personal Identity V2. public static PiiEntityCategory CZPersonalIdentityV2 { get; } = new PiiEntityCategory(CZPersonalIdentityV2Value); - /// DKPersonalIdentificationNumber. + /// DK Personal Identification Number. public static PiiEntityCategory DKPersonalIdentificationNumber { get; } = new PiiEntityCategory(DKPersonalIdentificationNumberValue); - /// DKPersonalIdentificationV2. + /// DK Personal Identification V2. public static PiiEntityCategory DKPersonalIdentificationV2 { get; } = new PiiEntityCategory(DKPersonalIdentificationV2Value); - /// DrugEnforcementAgencyNumber. + /// Drug Enforcement Agency Number. public static PiiEntityCategory DrugEnforcementAgencyNumber { get; } = new PiiEntityCategory(DrugEnforcementAgencyNumberValue); - /// EEPersonalIdentificationCode. + /// EE Personal Identification Code. public static PiiEntityCategory EEPersonalIdentificationCode { get; } = new PiiEntityCategory(EEPersonalIdentificationCodeValue); - /// EUDebitCardNumber. + /// EU Debit Card Number. public static PiiEntityCategory EUDebitCardNumber { get; } = new PiiEntityCategory(EUDebitCardNumberValue); - /// EUDriversLicenseNumber. + /// EU Driver's License Number. public static PiiEntityCategory EUDriversLicenseNumber { get; } = new PiiEntityCategory(EUDriversLicenseNumberValue); - /// EUGPSCoordinates. + /// EU GPS Coordinates. public static PiiEntityCategory EugpsCoordinates { get; } = new PiiEntityCategory(EugpsCoordinatesValue); - /// EUNationalIdentificationNumber. + /// EU National Identification Number. public static PiiEntityCategory EUNationalIdentificationNumber { get; } = new PiiEntityCategory(EUNationalIdentificationNumberValue); - /// EUPassportNumber. + /// EU Passport Number. public static PiiEntityCategory EUPassportNumber { get; } = new PiiEntityCategory(EUPassportNumberValue); - /// EUSocialSecurityNumber. + /// EU Social Security Number. public static PiiEntityCategory EUSocialSecurityNumber { get; } = new PiiEntityCategory(EUSocialSecurityNumberValue); - /// EUTaxIdentificationNumber. + /// EU Tax Identification Number. public static PiiEntityCategory EUTaxIdentificationNumber { get; } = new PiiEntityCategory(EUTaxIdentificationNumberValue); - /// FIEuropeanHealthNumber. + /// FI European Health Number. public static PiiEntityCategory FIEuropeanHealthNumber { get; } = new PiiEntityCategory(FIEuropeanHealthNumberValue); - /// FINationalID. + /// FI National ID. public static PiiEntityCategory FINationalID { get; } = new PiiEntityCategory(FINationalIDValue); - /// FINationalIDV2. + /// FI National ID V2. public static PiiEntityCategory FINationalIDV2 { get; } = new PiiEntityCategory(FINationalIDV2Value); - /// FIPassportNumber. + /// FI Passport Number. public static PiiEntityCategory FIPassportNumber { get; } = new PiiEntityCategory(FIPassportNumberValue); - /// FRDriversLicenseNumber. + /// FR Driver's License Number. public static PiiEntityCategory FRDriversLicenseNumber { get; } = new PiiEntityCategory(FRDriversLicenseNumberValue); - /// FRHealthInsuranceNumber. + /// FR Health Insurance Number. public static PiiEntityCategory FRHealthInsuranceNumber { get; } = new PiiEntityCategory(FRHealthInsuranceNumberValue); - /// FRNationalID. + /// FR National ID. public static PiiEntityCategory FRNationalID { get; } = new PiiEntityCategory(FRNationalIDValue); - /// FRPassportNumber. + /// FR Passport Number. public static PiiEntityCategory FRPassportNumber { get; } = new PiiEntityCategory(FRPassportNumberValue); - /// FRSocialSecurityNumber. + /// FR Social Security Number. public static PiiEntityCategory FRSocialSecurityNumber { get; } = new PiiEntityCategory(FRSocialSecurityNumberValue); - /// FRTaxIdentificationNumber. + /// FR Tax Identification Number. public static PiiEntityCategory FRTaxIdentificationNumber { get; } = new PiiEntityCategory(FRTaxIdentificationNumberValue); - /// FRValueAddedTaxNumber. + /// FR Value Added Tax Number. public static PiiEntityCategory FRValueAddedTaxNumber { get; } = new PiiEntityCategory(FRValueAddedTaxNumberValue); - /// DEDriversLicenseNumber. + /// DE Driver's License Number. public static PiiEntityCategory DEDriversLicenseNumber { get; } = new PiiEntityCategory(DEDriversLicenseNumberValue); - /// DEPassportNumber. + /// DE Passport Number. public static PiiEntityCategory DEPassportNumber { get; } = new PiiEntityCategory(DEPassportNumberValue); - /// DEIdentityCardNumber. + /// DE Identity Card Number. public static PiiEntityCategory DEIdentityCardNumber { get; } = new PiiEntityCategory(DEIdentityCardNumberValue); - /// DETaxIdentificationNumber. + /// DE Tax Identification Number. public static PiiEntityCategory DETaxIdentificationNumber { get; } = new PiiEntityCategory(DETaxIdentificationNumberValue); - /// DEValueAddedNumber. + /// DE Value Added Number. public static PiiEntityCategory DEValueAddedNumber { get; } = new PiiEntityCategory(DEValueAddedNumberValue); - /// GRNationalIDCard. + /// GR National ID Card. public static PiiEntityCategory GRNationalIDCard { get; } = new PiiEntityCategory(GRNationalIDCardValue); - /// GRNationalIDV2. + /// GR National ID V2. public static PiiEntityCategory GRNationalIDV2 { get; } = new PiiEntityCategory(GRNationalIDV2Value); - /// GRTaxIdentificationNumber. + /// GR Tax Identification Number. public static PiiEntityCategory GRTaxIdentificationNumber { get; } = new PiiEntityCategory(GRTaxIdentificationNumberValue); - /// HKIdentityCardNumber. + /// HK Identity Card Number. public static PiiEntityCategory HKIdentityCardNumber { get; } = new PiiEntityCategory(HKIdentityCardNumberValue); - /// HUValueAddedNumber. + /// HU Value Added Number. public static PiiEntityCategory HUValueAddedNumber { get; } = new PiiEntityCategory(HUValueAddedNumberValue); - /// HUPersonalIdentificationNumber. + /// HU Personal Identification Number. public static PiiEntityCategory HUPersonalIdentificationNumber { get; } = new PiiEntityCategory(HUPersonalIdentificationNumberValue); - /// HUTaxIdentificationNumber. + /// HU Tax Identification Number. public static PiiEntityCategory HUTaxIdentificationNumber { get; } = new PiiEntityCategory(HUTaxIdentificationNumberValue); - /// INPermanentAccount. + /// IN Permanent Account. public static PiiEntityCategory INPermanentAccount { get; } = new PiiEntityCategory(INPermanentAccountValue); - /// INUniqueIdentificationNumber. + /// IN Unique Identification Number. public static PiiEntityCategory INUniqueIdentificationNumber { get; } = new PiiEntityCategory(INUniqueIdentificationNumberValue); - /// IDIdentityCardNumber. + /// ID Identity Card Number. public static PiiEntityCategory IDIdentityCardNumber { get; } = new PiiEntityCategory(IDIdentityCardNumberValue); - /// InternationalBankingAccountNumber. + /// International Banking Account Number. public static PiiEntityCategory InternationalBankingAccountNumber { get; } = new PiiEntityCategory(InternationalBankingAccountNumberValue); - /// IEPersonalPublicServiceNumber. + /// IE Personal Public Service Number. public static PiiEntityCategory IEPersonalPublicServiceNumber { get; } = new PiiEntityCategory(IEPersonalPublicServiceNumberValue); - /// IEPersonalPublicServiceNumberV2. + /// IE Personal Public Service Number V2. public static PiiEntityCategory IEPersonalPublicServiceNumberV2 { get; } = new PiiEntityCategory(IEPersonalPublicServiceNumberV2Value); - /// ILBankAccountNumber. + /// IL Bank Account Number. public static PiiEntityCategory ILBankAccountNumber { get; } = new PiiEntityCategory(ILBankAccountNumberValue); - /// ILNationalID. + /// IL National ID. public static PiiEntityCategory ILNationalID { get; } = new PiiEntityCategory(ILNationalIDValue); - /// ITDriversLicenseNumber. + /// IT Driver's License Number. public static PiiEntityCategory ITDriversLicenseNumber { get; } = new PiiEntityCategory(ITDriversLicenseNumberValue); - /// ITFiscalCode. + /// IT Fiscal Code. public static PiiEntityCategory ITFiscalCode { get; } = new PiiEntityCategory(ITFiscalCodeValue); - /// ITValueAddedTaxNumber. + /// IT Value Added Tax Number. public static PiiEntityCategory ITValueAddedTaxNumber { get; } = new PiiEntityCategory(ITValueAddedTaxNumberValue); - /// JPBankAccountNumber. + /// JP Bank Account Number. public static PiiEntityCategory JPBankAccountNumber { get; } = new PiiEntityCategory(JPBankAccountNumberValue); - /// JPDriversLicenseNumber. + /// JP Driver's License Number. public static PiiEntityCategory JPDriversLicenseNumber { get; } = new PiiEntityCategory(JPDriversLicenseNumberValue); - /// JPPassportNumber. + /// JP Passport Number. public static PiiEntityCategory JPPassportNumber { get; } = new PiiEntityCategory(JPPassportNumberValue); - /// JPResidentRegistrationNumber. + /// JP Resident Registration Number. public static PiiEntityCategory JPResidentRegistrationNumber { get; } = new PiiEntityCategory(JPResidentRegistrationNumberValue); - /// JPSocialInsuranceNumber. + /// JP Social Insurance Number. public static PiiEntityCategory JPSocialInsuranceNumber { get; } = new PiiEntityCategory(JPSocialInsuranceNumberValue); - /// JPMyNumberCorporate. + /// JP My Number Corporate. public static PiiEntityCategory JPMyNumberCorporate { get; } = new PiiEntityCategory(JPMyNumberCorporateValue); - /// JPMyNumberPersonal. + /// JP My Number Personal. public static PiiEntityCategory JPMyNumberPersonal { get; } = new PiiEntityCategory(JPMyNumberPersonalValue); - /// JPResidenceCardNumber. + /// JP Residence Card Number. public static PiiEntityCategory JPResidenceCardNumber { get; } = new PiiEntityCategory(JPResidenceCardNumberValue); - /// LVPersonalCode. + /// LV Personal Code. public static PiiEntityCategory LVPersonalCode { get; } = new PiiEntityCategory(LVPersonalCodeValue); - /// LTPersonalCode. + /// LT Personal Code. public static PiiEntityCategory LTPersonalCode { get; } = new PiiEntityCategory(LTPersonalCodeValue); - /// LUNationalIdentificationNumberNatural. + /// LU National Identification Number Natural. public static PiiEntityCategory LUNationalIdentificationNumberNatural { get; } = new PiiEntityCategory(LUNationalIdentificationNumberNaturalValue); - /// LUNationalIdentificationNumberNonNatural. + /// LU National Identification Number Non Natural. public static PiiEntityCategory LUNationalIdentificationNumberNonNatural { get; } = new PiiEntityCategory(LUNationalIdentificationNumberNonNaturalValue); - /// MYIdentityCardNumber. + /// MY Identity Card Number. public static PiiEntityCategory MYIdentityCardNumber { get; } = new PiiEntityCategory(MYIdentityCardNumberValue); - /// MTIdentityCardNumber. + /// MT Identity Card Number. public static PiiEntityCategory MTIdentityCardNumber { get; } = new PiiEntityCategory(MTIdentityCardNumberValue); - /// MTTaxIDNumber. + /// MT Tax ID Number. public static PiiEntityCategory MTTaxIDNumber { get; } = new PiiEntityCategory(MTTaxIDNumberValue); - /// NLCitizensServiceNumber. + /// NL Citizens Service Number. public static PiiEntityCategory NLCitizensServiceNumber { get; } = new PiiEntityCategory(NLCitizensServiceNumberValue); - /// NLCitizensServiceNumberV2. + /// NL Citizens Service Number V2. public static PiiEntityCategory NLCitizensServiceNumberV2 { get; } = new PiiEntityCategory(NLCitizensServiceNumberV2Value); - /// NLTaxIdentificationNumber. + /// NL Tax Identification Number. public static PiiEntityCategory NLTaxIdentificationNumber { get; } = new PiiEntityCategory(NLTaxIdentificationNumberValue); - /// NLValueAddedTaxNumber. + /// NL Value Added Tax Number. public static PiiEntityCategory NLValueAddedTaxNumber { get; } = new PiiEntityCategory(NLValueAddedTaxNumberValue); - /// NZBankAccountNumber. + /// NZ Bank Account Number. public static PiiEntityCategory NZBankAccountNumber { get; } = new PiiEntityCategory(NZBankAccountNumberValue); - /// NZDriversLicenseNumber. + /// NZ Driver's License Number. public static PiiEntityCategory NZDriversLicenseNumber { get; } = new PiiEntityCategory(NZDriversLicenseNumberValue); - /// NZInlandRevenueNumber. + /// NZ Inland Revenue Number. public static PiiEntityCategory NZInlandRevenueNumber { get; } = new PiiEntityCategory(NZInlandRevenueNumberValue); - /// NZMinistryOfHealthNumber. + /// NZ Ministry Of Health Number. public static PiiEntityCategory NZMinistryOfHealthNumber { get; } = new PiiEntityCategory(NZMinistryOfHealthNumberValue); - /// NZSocialWelfareNumber. + /// NZ Social Welfare Number. public static PiiEntityCategory NZSocialWelfareNumber { get; } = new PiiEntityCategory(NZSocialWelfareNumberValue); - /// NOIdentityNumber. + /// NO Identity Number. public static PiiEntityCategory NOIdentityNumber { get; } = new PiiEntityCategory(NOIdentityNumberValue); - /// PHUnifiedMultiPurposeIDNumber. + /// PH Unified Multi Purpose ID Number. public static PiiEntityCategory PHUnifiedMultiPurposeIDNumber { get; } = new PiiEntityCategory(PHUnifiedMultiPurposeIDNumberValue); - /// PLIdentityCard. + /// PL Identity Card. public static PiiEntityCategory PLIdentityCard { get; } = new PiiEntityCategory(PLIdentityCardValue); - /// PLNationalID. + /// PL National ID. public static PiiEntityCategory PLNationalID { get; } = new PiiEntityCategory(PLNationalIDValue); - /// PLNationalIDV2. + /// PL National ID V2. public static PiiEntityCategory PLNationalIDV2 { get; } = new PiiEntityCategory(PLNationalIDV2Value); - /// PLPassportNumber. + /// PL Passport Number. public static PiiEntityCategory PLPassportNumber { get; } = new PiiEntityCategory(PLPassportNumberValue); - /// PLTaxIdentificationNumber. + /// PL Tax Identification Number. public static PiiEntityCategory PLTaxIdentificationNumber { get; } = new PiiEntityCategory(PLTaxIdentificationNumberValue); - /// PLREGONNumber. + /// PL REGON Number. public static PiiEntityCategory PlregonNumber { get; } = new PiiEntityCategory(PlregonNumberValue); - /// PTCitizenCardNumber. + /// PT Citizen Card Number. public static PiiEntityCategory PTCitizenCardNumber { get; } = new PiiEntityCategory(PTCitizenCardNumberValue); - /// PTCitizenCardNumberV2. + /// PT Citizen Card Number V2. public static PiiEntityCategory PTCitizenCardNumberV2 { get; } = new PiiEntityCategory(PTCitizenCardNumberV2Value); - /// PTTaxIdentificationNumber. + /// PT Tax Identification Number. public static PiiEntityCategory PTTaxIdentificationNumber { get; } = new PiiEntityCategory(PTTaxIdentificationNumberValue); - /// ROPersonalNumericalCode. + /// RO Personal Numerical Code. public static PiiEntityCategory ROPersonalNumericalCode { get; } = new PiiEntityCategory(ROPersonalNumericalCodeValue); - /// RUPassportNumberDomestic. + /// RU Passport Number Domestic. public static PiiEntityCategory RUPassportNumberDomestic { get; } = new PiiEntityCategory(RUPassportNumberDomesticValue); - /// RUPassportNumberInternational. + /// RU Passport Number International. public static PiiEntityCategory RUPassportNumberInternational { get; } = new PiiEntityCategory(RUPassportNumberInternationalValue); - /// SANationalID. + /// SA National ID. public static PiiEntityCategory SANationalID { get; } = new PiiEntityCategory(SANationalIDValue); - /// SGNationalRegistrationIdentityCardNumber. + /// SG National Registration Identity Card Number. public static PiiEntityCategory SGNationalRegistrationIdentityCardNumber { get; } = new PiiEntityCategory(SGNationalRegistrationIdentityCardNumberValue); - /// SKPersonalNumber. + /// SK Personal Number. public static PiiEntityCategory SKPersonalNumber { get; } = new PiiEntityCategory(SKPersonalNumberValue); - /// SITaxIdentificationNumber. + /// SI Tax Identification Number. public static PiiEntityCategory SITaxIdentificationNumber { get; } = new PiiEntityCategory(SITaxIdentificationNumberValue); - /// SIUniqueMasterCitizenNumber. + /// SI Unique Master Citizen Number. public static PiiEntityCategory SIUniqueMasterCitizenNumber { get; } = new PiiEntityCategory(SIUniqueMasterCitizenNumberValue); - /// ZAIdentificationNumber. + /// ZA Identification Number. public static PiiEntityCategory ZAIdentificationNumber { get; } = new PiiEntityCategory(ZAIdentificationNumberValue); - /// KRResidentRegistrationNumber. + /// KR Resident Registration Number. public static PiiEntityCategory KRResidentRegistrationNumber { get; } = new PiiEntityCategory(KRResidentRegistrationNumberValue); - /// ESDNI. + /// ES DNI. public static PiiEntityCategory Esdni { get; } = new PiiEntityCategory(EsdniValue); - /// ESSocialSecurityNumber. + /// ES Social Security Number. public static PiiEntityCategory ESSocialSecurityNumber { get; } = new PiiEntityCategory(ESSocialSecurityNumberValue); - /// ESTaxIdentificationNumber. + /// ES Tax Identification Number. public static PiiEntityCategory ESTaxIdentificationNumber { get; } = new PiiEntityCategory(ESTaxIdentificationNumberValue); - /// SQLServerConnectionString. + /// SQL Server Connection String. public static PiiEntityCategory SQLServerConnectionString { get; } = new PiiEntityCategory(SQLServerConnectionStringValue); - /// SENationalID. + /// SE National ID. public static PiiEntityCategory SENationalID { get; } = new PiiEntityCategory(SENationalIDValue); - /// SENationalIDV2. + /// SE National ID V2. public static PiiEntityCategory SENationalIDV2 { get; } = new PiiEntityCategory(SENationalIDV2Value); - /// SEPassportNumber. + /// SE Passport Number. public static PiiEntityCategory SEPassportNumber { get; } = new PiiEntityCategory(SEPassportNumberValue); - /// SETaxIdentificationNumber. + /// SE Tax Identification Number. public static PiiEntityCategory SETaxIdentificationNumber { get; } = new PiiEntityCategory(SETaxIdentificationNumberValue); - /// SWIFTCode. + /// SWIFT Code. public static PiiEntityCategory SwiftCode { get; } = new PiiEntityCategory(SwiftCodeValue); - /// CHSocialSecurityNumber. + /// CH Social Security Number. public static PiiEntityCategory CHSocialSecurityNumber { get; } = new PiiEntityCategory(CHSocialSecurityNumberValue); - /// TWNationalID. + /// TW National ID. public static PiiEntityCategory TWNationalID { get; } = new PiiEntityCategory(TWNationalIDValue); - /// TWPassportNumber. + /// TW Passport Number. public static PiiEntityCategory TWPassportNumber { get; } = new PiiEntityCategory(TWPassportNumberValue); - /// TWResidentCertificate. + /// TW Resident Certificate. public static PiiEntityCategory TWResidentCertificate { get; } = new PiiEntityCategory(TWResidentCertificateValue); - /// THPopulationIdentificationCode. + /// TH Population Identification Code. public static PiiEntityCategory THPopulationIdentificationCode { get; } = new PiiEntityCategory(THPopulationIdentificationCodeValue); - /// TRNationalIdentificationNumber. + /// TR National Identification Number. public static PiiEntityCategory TRNationalIdentificationNumber { get; } = new PiiEntityCategory(TRNationalIdentificationNumberValue); - /// UKDriversLicenseNumber. + /// UK Driver's License Number. public static PiiEntityCategory UKDriversLicenseNumber { get; } = new PiiEntityCategory(UKDriversLicenseNumberValue); - /// UKElectoralRollNumber. + /// UK Electoral Roll Number. public static PiiEntityCategory UKElectoralRollNumber { get; } = new PiiEntityCategory(UKElectoralRollNumberValue); - /// UKNationalHealthNumber. + /// UK National Health Number. public static PiiEntityCategory UKNationalHealthNumber { get; } = new PiiEntityCategory(UKNationalHealthNumberValue); - /// UKNationalInsuranceNumber. + /// UK National Insurance Number. public static PiiEntityCategory UKNationalInsuranceNumber { get; } = new PiiEntityCategory(UKNationalInsuranceNumberValue); - /// UKUniqueTaxpayerNumber. + /// UK Unique Taxpayer Number. public static PiiEntityCategory UKUniqueTaxpayerNumber { get; } = new PiiEntityCategory(UKUniqueTaxpayerNumberValue); - /// USUKPassportNumber. + /// US UK Passport Number. public static PiiEntityCategory UsukPassportNumber { get; } = new PiiEntityCategory(UsukPassportNumberValue); - /// USBankAccountNumber. + /// US Bank Account Number. public static PiiEntityCategory USBankAccountNumber { get; } = new PiiEntityCategory(USBankAccountNumberValue); - /// USDriversLicenseNumber. + /// US Driver's License Number. public static PiiEntityCategory USDriversLicenseNumber { get; } = new PiiEntityCategory(USDriversLicenseNumberValue); - /// USIndividualTaxpayerIdentification. + /// US Individual Taxpayer Identification. public static PiiEntityCategory USIndividualTaxpayerIdentification { get; } = new PiiEntityCategory(USIndividualTaxpayerIdentificationValue); - /// USSocialSecurityNumber. + /// US Social Security Number. public static PiiEntityCategory USSocialSecurityNumber { get; } = new PiiEntityCategory(USSocialSecurityNumberValue); - /// UAPassportNumberDomestic. + /// UA Passport Number Domestic. public static PiiEntityCategory UAPassportNumberDomestic { get; } = new PiiEntityCategory(UAPassportNumberDomesticValue); - /// UAPassportNumberInternational. + /// UA Passport Number International. public static PiiEntityCategory UAPassportNumberInternational { get; } = new PiiEntityCategory(UAPassportNumberInternationalValue); /// Organization. public static PiiEntityCategory Organization { get; } = new PiiEntityCategory(OrganizationValue); @@ -528,9 +528,9 @@ public PiiEntityCategory(string value) public static PiiEntityCategory URL { get; } = new PiiEntityCategory(URLValue); /// Age. public static PiiEntityCategory Age { get; } = new PiiEntityCategory(AgeValue); - /// PhoneNumber. + /// Phone Number. public static PiiEntityCategory PhoneNumber { get; } = new PiiEntityCategory(PhoneNumberValue); - /// IPAddress. + /// IP Address. public static PiiEntityCategory IPAddress { get; } = new PiiEntityCategory(IPAddressValue); /// Date. public static PiiEntityCategory Date { get; } = new PiiEntityCategory(DateValue); @@ -538,9 +538,9 @@ public PiiEntityCategory(string value) public static PiiEntityCategory Person { get; } = new PiiEntityCategory(PersonValue); /// Address. public static PiiEntityCategory Address { get; } = new PiiEntityCategory(AddressValue); - /// All. + /// All PII categories. public static PiiEntityCategory All { get; } = new PiiEntityCategory(AllValue); - /// Default. + /// Default PII categories for the language. public static PiiEntityCategory Default { get; } = new PiiEntityCategory(DefaultValue); /// Determines if two values are the same. public static bool operator ==(PiiEntityCategory left, PiiEntityCategory right) => left.Equals(right); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.Serialization.cs index 30b4acd4783d..728f963e02f2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class PiiEntityRecognitionLROResult : IUtf8JsonSerializable + internal partial class PiiEntityRecognitionLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static PiiEntityRecognitionLROResult DeserializePiiEntityRecognitionLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static PiiEntityRecognitionLROResult DeserializePiiEntityRecognitionLRO return null; } PiiEntitiesResult results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static PiiEntityRecognitionLROResult DeserializePiiEntityRecognitionLRO results = PiiEntitiesResult.DeserializePiiEntitiesResult(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new PiiEntityRecognitionLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new PiiEntityRecognitionLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static PiiEntityRecognitionLROResult DeserializePiiEntityRecognitionLRO using var document = JsonDocument.Parse(response.Content); return DeserializePiiEntityRecognitionLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.cs index 4ac52d7a7574..eae8fecc5d4b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiEntityRecognitionLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The PiiEntityRecognitionLROResult. + /// Contains the PII LRO results. internal partial class PiiEntityRecognitionLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// The list of pii results. /// is null. - public PiiEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, PiiEntitiesResult results) : base(lastUpdateDateTime, status) + internal PiiEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, PiiEntitiesResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public PiiEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnal } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal PiiEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, PiiEntitiesResult results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// The list of pii results. + internal PiiEntityRecognitionLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, PiiEntitiesResult results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public PiiEntitiesResult Results { get; set; } + /// The list of pii results. + public PiiEntitiesResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.Serialization.cs index 3b983c83e6f1..5e3e2c61bdc6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static PiiLROTask DeserializePiiLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PiiTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = PiiTaskParameters.DeserializePiiTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new PiiLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new PiiLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializePiiLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.cs index 63641ab154b7..babe90ff642a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiLROTask.cs @@ -7,7 +7,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// An object representing the task definition for a PII Entities Recognition task. + /// Contains the analyze text PIIEntityRecognition LRO task. internal partial class PiiLROTask : AnalyzeTextLROTask { /// Initializes a new instance of . @@ -17,16 +17,16 @@ public PiiLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a PII Entities Recognition task. + /// task name. + /// The kind of task to perform. + /// Pii task parameters. internal PiiLROTask(string taskName, AnalyzeTextLROTaskKind kind, PiiTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a PII Entities Recognition task. + /// Pii task parameters. public PiiTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiResultDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiResultDocumentsItem.Serialization.cs deleted file mode 100644 index 9476d66dff70..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiResultDocumentsItem.Serialization.cs +++ /dev/null @@ -1,117 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class PiiResultDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("redactedText"u8); - writer.WriteStringValue(RedactedText); - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static PiiResultDocumentsItem DeserializePiiResultDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string redactedText = default; - IList entities = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("redactedText"u8)) - { - redactedText = property.Value.GetString(); - continue; - } - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Entity.DeserializeEntity(item)); - } - entities = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new PiiResultDocumentsItem(id, warnings, statistics, redactedText, entities); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new PiiResultDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializePiiResultDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiResultDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiResultDocumentsItem.cs deleted file mode 100644 index 8b2c631c22e5..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiResultDocumentsItem.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The PiiResultDocumentsItem. - internal partial class PiiResultDocumentsItem : PiiEntitiesDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Returns redacted text. - /// Recognized entities in the document. - /// , , or is null. - public PiiResultDocumentsItem(string id, IEnumerable warnings, string redactedText, IEnumerable entities) : base(id, warnings, redactedText, entities) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(redactedText, nameof(redactedText)); - Argument.AssertNotNull(entities, nameof(entities)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Returns redacted text. - /// Recognized entities in the document. - internal PiiResultDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, string redactedText, IList entities) : base(id, warnings, statistics, redactedText, entities) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.Serialization.cs index 6aba4a44c028..8aee46becce1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -16,6 +15,16 @@ internal partial class PiiTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(LoggingOptOut)) + { + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); + } + if (Optional.IsDefined(ModelVersion)) + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } if (Optional.IsDefined(Domain)) { writer.WritePropertyName("domain"u8); @@ -36,92 +45,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("stringIndexType"u8); writer.WriteStringValue(StringIndexType.Value.ToString()); } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } writer.WriteEndObject(); } - internal static PiiTaskParameters DeserializePiiTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PiiDomain? domain = default; - IList piiCategories = default; - StringIndexType? stringIndexType = default; - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domain"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - domain = new PiiDomain(property.Value.GetString()); - continue; - } - if (property.NameEquals("piiCategories"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new PiiEntityCategory(item.GetString())); - } - piiCategories = array; - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new PiiTaskParameters(loggingOptOut, modelVersion, domain, piiCategories ?? new ChangeTrackingList(), stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new PiiTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializePiiTaskParameters(document.RootElement); - } - /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.cs index 325ba1d66c47..757d486ccc5e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskParameters.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a PII Entities Recognition task. - internal partial class PiiTaskParameters : PreBuiltTaskParameters + internal partial class PiiTaskParameters { /// Initializes a new instance of . public PiiTaskParameters() @@ -19,21 +19,27 @@ public PiiTaskParameters() } /// Initializes a new instance of . - /// - /// - /// The PII domain used for PII Entity Recognition. - /// (Optional) describes the PII categories to return. - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal PiiTaskParameters(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + /// Domain for PII task. + /// Enumeration of PII categories to be returned in the response. + /// StringIndexType to be used for analysis. + internal PiiTaskParameters(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; Domain = domain; PiiCategories = piiCategories; StringIndexType = stringIndexType; } - /// The PII domain used for PII Entity Recognition. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Domain for PII task. public PiiDomain? Domain { get; set; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// StringIndexType to be used for analysis. public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskResult.cs index 71c5c8988e98..aff5c9bb87d4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PiiTaskResult.cs @@ -9,11 +9,11 @@ namespace Azure.AI.TextAnalytics.Models { - /// The PiiTaskResult. + /// Contains the analyze text PIIEntityRecognition LRO task. internal partial class PiiTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// + /// The list of pii results. /// is null. internal PiiTaskResult(PiiEntitiesResult results) { @@ -24,15 +24,15 @@ internal PiiTaskResult(PiiEntitiesResult results) } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. - /// + /// The kind of task result. + /// The list of pii results. internal PiiTaskResult(AnalyzeTextTaskResultsKind kind, PiiEntitiesResult results) : base(kind) { Results = results; Kind = kind; } - /// Gets the results. + /// The list of pii results. public PiiEntitiesResult Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltResult.Serialization.cs deleted file mode 100644 index c8c75f63edf3..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltResult.Serialization.cs +++ /dev/null @@ -1,91 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class PreBuiltResult : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - - internal static PreBuiltResult DeserializePreBuiltResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList errors = default; - TextDocumentBatchStatistics statistics = default; - string modelVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("errors"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentError.DeserializeDocumentError(item)); - } - errors = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentBatchStatistics.DeserializeTextDocumentBatchStatistics(property.Value); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - } - return new PreBuiltResult(errors, statistics, modelVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static PreBuiltResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializePreBuiltResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltResult.cs deleted file mode 100644 index cfd4c1ba808f..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltResult.cs +++ /dev/null @@ -1,48 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - /// The PreBuiltResult. - internal partial class PreBuiltResult - { - /// Initializes a new instance of . - /// Errors by document id. - /// This field indicates which model is used for scoring. - /// or is null. - public PreBuiltResult(IEnumerable errors, string modelVersion) - { - Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(modelVersion, nameof(modelVersion)); - - Errors = errors.ToList(); - ModelVersion = modelVersion; - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates which model is used for scoring. - internal PreBuiltResult(IList errors, TextDocumentBatchStatistics statistics, string modelVersion) - { - Errors = errors; - Statistics = statistics; - ModelVersion = modelVersion; - } - - /// Errors by document id. - public IList Errors { get; } - /// if showStats=true was specified in the request this field will contain information about the request payload. - public TextDocumentBatchStatistics Statistics { get; set; } - /// This field indicates which model is used for scoring. - public string ModelVersion { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltTaskParameters.Serialization.cs deleted file mode 100644 index 11813a8a4536..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltTaskParameters.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class PreBuiltTaskParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WriteEndObject(); - } - - internal static PreBuiltTaskParameters DeserializePreBuiltTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new PreBuiltTaskParameters(loggingOptOut, modelVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new PreBuiltTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializePreBuiltTaskParameters(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltTaskParameters.cs deleted file mode 100644 index e119c77bd0bf..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/PreBuiltTaskParameters.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// Parameters object for a text analysis task using pre-built models. - internal partial class PreBuiltTaskParameters : TaskParameters - { - /// Initializes a new instance of . - public PreBuiltTaskParameters() - { - } - - /// Initializes a new instance of . - /// - /// - internal PreBuiltTaskParameters(bool? loggingOptOut, string modelVersion) : base(loggingOptOut) - { - ModelVersion = modelVersion; - } - - /// Gets or sets the model version. - public string ModelVersion { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.Serialization.cs index 8276d74414b6..fed47d77ef22 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.Serialization.cs @@ -6,30 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class SentenceAssessment : IUtf8JsonSerializable + internal partial class SentenceAssessment { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("isNegated"u8); - writer.WriteBooleanValue(IsNegated); - writer.WriteEndObject(); - } - internal static SentenceAssessment DeserializeSentenceAssessment(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -91,13 +72,5 @@ internal static SentenceAssessment FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeSentenceAssessment(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.cs index 25db6ebf0fe3..f206ce23a158 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceAssessment.cs @@ -9,18 +9,18 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentenceAssessment. + /// Represents a sentence assessment and the assessments or target objects related to it. internal partial class SentenceAssessment { /// Initializes a new instance of . - /// Assessment sentiment in the sentence. - /// Assessment sentiment confidence scores in the sentence. - /// The assessment offset from the start of the sentence. - /// The length of the assessment. - /// The assessment text detected. + /// The sentiment of the sentence. + /// Represents the confidence scores across all sentiment classes: positive and negative. + /// The target offset from the start of the sentence. + /// The length of the target. + /// The target text detected. /// The indicator representing if the assessment is negated. /// , or is null. - public SentenceAssessment(string sentiment, TargetConfidenceScoreLabel confidenceScores, int offset, int length, string text, bool isNegated) + internal SentenceAssessment(string sentiment, TargetConfidenceScoreLabel confidenceScores, int offset, int length, string text, bool isNegated) { Argument.AssertNotNull(sentiment, nameof(sentiment)); Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); @@ -33,15 +33,15 @@ public SentenceAssessment(string sentiment, TargetConfidenceScoreLabel confidenc Text = text; IsNegated = isNegated; } - /// Assessment sentiment confidence scores in the sentence. - public TargetConfidenceScoreLabel ConfidenceScores { get; set; } - /// The assessment offset from the start of the sentence. - public int Offset { get; set; } - /// The length of the assessment. - public int Length { get; set; } - /// The assessment text detected. - public string Text { get; set; } + /// Represents the confidence scores across all sentiment classes: positive and negative. + public TargetConfidenceScoreLabel ConfidenceScores { get; } + /// The target offset from the start of the sentence. + public int Offset { get; } + /// The length of the target. + public int Length { get; } + /// The target text detected. + public string Text { get; } /// The indicator representing if the assessment is negated. - public bool IsNegated { get; set; } + public bool IsNegated { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.Serialization.cs index 5e1d5d4c7a87..9e1860075e6b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.Serialization.cs @@ -7,48 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial struct SentenceSentimentInternal : IUtf8JsonSerializable + internal partial struct SentenceSentimentInternal { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - if (Optional.IsCollectionDefined(Targets)) - { - writer.WritePropertyName("targets"u8); - writer.WriteStartArray(); - foreach (var item in Targets) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Assessments)) - { - writer.WritePropertyName("assessments"u8); - writer.WriteStartArray(); - foreach (var item in Assessments) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - internal static SentenceSentimentInternal DeserializeSentenceSentimentInternal(JsonElement element) { string text = default; @@ -131,13 +94,5 @@ internal static SentenceSentimentInternal FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeSentenceSentimentInternal(document.RootElement); } - - /// Convert into a . - internal RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.cs index 737eb6bdb740..2565ea04a8df 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceSentimentInternal.cs @@ -11,19 +11,19 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentenceSentiment. + /// A document's sentence sentiment. internal readonly partial struct SentenceSentimentInternal { /// Initializes a new instance of . /// The sentence text. /// The predicted Sentiment for the sentence. /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The sentence offset from the start of the document. - /// The length of the sentence. + /// The target offset from the start of the sentence. + /// The length of the target. /// The array of sentence targets for the sentence. /// The array of assessments for the sentence. /// , or is null. - public SentenceSentimentInternal(string text, string sentiment, SentimentConfidenceScores confidenceScores, int offset, int length, IEnumerable targets, IEnumerable assessments) + internal SentenceSentimentInternal(string text, string sentiment, SentimentConfidenceScores confidenceScores, int offset, int length, IEnumerable targets, IEnumerable assessments) { Argument.AssertNotNull(text, nameof(text)); Argument.AssertNotNull(sentiment, nameof(sentiment)); @@ -42,8 +42,8 @@ public SentenceSentimentInternal(string text, string sentiment, SentimentConfide /// The sentence text. /// The predicted Sentiment for the sentence. /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The sentence offset from the start of the document. - /// The length of the sentence. + /// The target offset from the start of the sentence. + /// The length of the target. /// The array of sentence targets for the sentence. /// The array of assessments for the sentence. internal SentenceSentimentInternal(string text, string sentiment, SentimentConfidenceScores confidenceScores, int offset, int length, IReadOnlyList targets, IReadOnlyList assessments) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.Serialization.cs index b75fcfe947ce..c944f1118759 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.Serialization.cs @@ -7,35 +7,11 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class SentenceTarget : IUtf8JsonSerializable + internal partial class SentenceTarget { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("relations"u8); - writer.WriteStartArray(); - foreach (var item in Relations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - internal static SentenceTarget DeserializeSentenceTarget(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -47,7 +23,7 @@ internal static SentenceTarget DeserializeSentenceTarget(JsonElement element) int offset = default; int length = default; string text = default; - IList relations = default; + IReadOnlyList relations = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sentiment"u8)) @@ -102,13 +78,5 @@ internal static SentenceTarget FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeSentenceTarget(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.cs index 73252692663b..e5de45e4f122 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentenceTarget.cs @@ -11,18 +11,18 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentenceTarget. + /// Represents a sentence target and the assessments or target objects related to it. internal partial class SentenceTarget { /// Initializes a new instance of . - /// Targeted sentiment in the sentence. - /// Target sentiment confidence scores for the target in the sentence. + /// The sentiment of the sentence. + /// Represents the confidence scores across all sentiment classes: positive and negative. /// The target offset from the start of the sentence. /// The length of the target. /// The target text detected. /// The array of either assessment or target objects which is related to the target. /// , , or is null. - public SentenceTarget(string sentiment, TargetConfidenceScoreLabel confidenceScores, int offset, int length, string text, IEnumerable relations) + internal SentenceTarget(string sentiment, TargetConfidenceScoreLabel confidenceScores, int offset, int length, string text, IEnumerable relations) { Argument.AssertNotNull(sentiment, nameof(sentiment)); Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); @@ -38,13 +38,13 @@ public SentenceTarget(string sentiment, TargetConfidenceScoreLabel confidenceSco } /// Initializes a new instance of . - /// Targeted sentiment in the sentence. - /// Target sentiment confidence scores for the target in the sentence. + /// The sentiment of the sentence. + /// Represents the confidence scores across all sentiment classes: positive and negative. /// The target offset from the start of the sentence. /// The length of the target. /// The target text detected. /// The array of either assessment or target objects which is related to the target. - internal SentenceTarget(string sentiment, TargetConfidenceScoreLabel confidenceScores, int offset, int length, string text, IList relations) + internal SentenceTarget(string sentiment, TargetConfidenceScoreLabel confidenceScores, int offset, int length, string text, IReadOnlyList relations) { Sentiment = sentiment; ConfidenceScores = confidenceScores; @@ -53,15 +53,15 @@ internal SentenceTarget(string sentiment, TargetConfidenceScoreLabel confidenceS Text = text; Relations = relations; } - /// Target sentiment confidence scores for the target in the sentence. - public TargetConfidenceScoreLabel ConfidenceScores { get; set; } + /// Represents the confidence scores across all sentiment classes: positive and negative. + public TargetConfidenceScoreLabel ConfidenceScores { get; } /// The target offset from the start of the sentence. - public int Offset { get; set; } + public int Offset { get; } /// The length of the target. - public int Length { get; set; } + public int Length { get; } /// The target text detected. - public string Text { get; set; } + public string Text { get; } /// The array of either assessment or target objects which is related to the target. - public IList Relations { get; } + public IReadOnlyList Relations { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.Serialization.cs index 55fc1c4edbd9..3c850cde59a2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.Serialization.cs @@ -20,58 +20,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(Parameters); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(TaskName)) { writer.WritePropertyName("taskName"u8); writer.WriteStringValue(TaskName); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static SentimentAnalysisLROTask DeserializeSentimentAnalysisLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SentimentAnalysisTaskParameters parameters = default; - AnalyzeTextLROTaskKind kind = default; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = SentimentAnalysisTaskParameters.DeserializeSentimentAnalysisTaskParameters(property.Value); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new SentimentAnalysisLROTask(taskName, kind, parameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new SentimentAnalysisLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSentimentAnalysisLROTask(document.RootElement); - } - /// Convert into a . internal override RequestContent ToRequestContent() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.cs index 355069753eab..ede5561b5f2d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisLROTask.cs @@ -17,16 +17,16 @@ public SentimentAnalysisLROTask() } /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - /// Supported parameters for a Sentiment Analysis task. + /// task name. + /// The kind of task to perform. + /// Parameters for the Sentiment Analysis task. internal SentimentAnalysisLROTask(string taskName, AnalyzeTextLROTaskKind kind, SentimentAnalysisTaskParameters parameters) : base(taskName, kind) { Parameters = parameters; Kind = kind; } - /// Supported parameters for a Sentiment Analysis task. + /// Parameters for the Sentiment Analysis task. public SentimentAnalysisTaskParameters Parameters { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.Serialization.cs index 213e6c31ae3c..5d35165c5857 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.Serialization.cs @@ -15,87 +15,31 @@ internal partial class SentimentAnalysisTaskParameters : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(OpinionMining)) - { - writer.WritePropertyName("opinionMining"u8); - writer.WriteBooleanValue(OpinionMining.Value); - } - if (Optional.IsDefined(StringIndexType)) + if (Optional.IsDefined(LoggingOptOut)) { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); + writer.WritePropertyName("loggingOptOut"u8); + writer.WriteBooleanValue(LoggingOptOut.Value); } if (Optional.IsDefined(ModelVersion)) { writer.WritePropertyName("modelVersion"u8); writer.WriteStringValue(ModelVersion); } - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WriteEndObject(); - } - - internal static SentimentAnalysisTaskParameters DeserializeSentimentAnalysisTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) + if (Optional.IsDefined(OpinionMining)) { - return null; + writer.WritePropertyName("opinionMining"u8); + writer.WriteBooleanValue(OpinionMining.Value); } - bool? opinionMining = default; - StringIndexType? stringIndexType = default; - string modelVersion = default; - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) + if (Optional.IsDefined(StringIndexType)) { - if (property.NameEquals("opinionMining"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - opinionMining = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.Value.ToString()); } - return new SentimentAnalysisTaskParameters(loggingOptOut, modelVersion, opinionMining, stringIndexType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new SentimentAnalysisTaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSentimentAnalysisTaskParameters(document.RootElement); + writer.WriteEndObject(); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.cs index 3396cd7fc1e6..ec67b9bc64bc 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentAnalysisTaskParameters.cs @@ -8,7 +8,7 @@ namespace Azure.AI.TextAnalytics.Models { /// Supported parameters for a Sentiment Analysis task. - internal partial class SentimentAnalysisTaskParameters : PreBuiltTaskParameters + internal partial class SentimentAnalysisTaskParameters { /// Initializes a new instance of . public SentimentAnalysisTaskParameters() @@ -16,19 +16,25 @@ public SentimentAnalysisTaskParameters() } /// Initializes a new instance of . - /// - /// - /// - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - internal SentimentAnalysisTaskParameters(bool? loggingOptOut, string modelVersion, bool? opinionMining, StringIndexType? stringIndexType) : base(loggingOptOut, modelVersion) + /// logging opt out. + /// model version. + /// Whether to use opinion mining in the request or not. + /// Specifies the method used to interpret string offsets. + internal SentimentAnalysisTaskParameters(bool? loggingOptOut, string modelVersion, bool? opinionMining, StringIndexType? stringIndexType) { + LoggingOptOut = loggingOptOut; + ModelVersion = modelVersion; OpinionMining = opinionMining; StringIndexType = stringIndexType; } - /// Gets or sets the opinion mining. + /// logging opt out. + public bool? LoggingOptOut { get; set; } + /// model version. + public string ModelVersion { get; set; } + /// Whether to use opinion mining in the request or not. public bool? OpinionMining { get; set; } - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// Specifies the method used to interpret string offsets. public StringIndexType? StringIndexType { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.Serialization.cs index 70f8556d4def..6bf1bb64348b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.Serialization.cs @@ -6,24 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; -namespace Azure.AI.TextAnalytics +namespace Azure.AI.TextAnalytics.Models { - public partial class SentimentConfidenceScores : IUtf8JsonSerializable + internal partial class SentimentConfidenceScores { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("positive"u8); - writer.WriteNumberValue(Positive); - writer.WritePropertyName("neutral"u8); - writer.WriteNumberValue(Neutral); - writer.WritePropertyName("negative"u8); - writer.WriteNumberValue(Negative); - writer.WriteEndObject(); - } - internal static SentimentConfidenceScores DeserializeSentimentConfidenceScores(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -61,13 +48,5 @@ internal static SentimentConfidenceScores FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeSentimentConfidenceScores(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.cs index 7a819363e8a2..cf551aa54183 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentConfidenceScores.cs @@ -5,10 +5,27 @@ #nullable disable -namespace Azure.AI.TextAnalytics +namespace Azure.AI.TextAnalytics.Models { /// Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. - public partial class SentimentConfidenceScores + internal partial class SentimentConfidenceScores { + /// Initializes a new instance of . + /// Confidence score for positive sentiment. + /// Confidence score for neutral sentiment. + /// Confidence score for negative sentiment. + internal SentimentConfidenceScores(double positive, double neutral, double negative) + { + Positive = positive; + Neutral = neutral; + Negative = negative; + } + + /// Confidence score for positive sentiment. + public double Positive { get; } + /// Confidence score for neutral sentiment. + public double Neutral { get; } + /// Confidence score for negative sentiment. + public double Negative { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.Serialization.cs index d9c1ed683496..92306369dc74 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.Serialization.cs @@ -7,77 +7,25 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class SentimentDocumentResult : IUtf8JsonSerializable + internal partial class SentimentDocumentResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment.ToSerialString()); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores); - writer.WritePropertyName("sentences"u8); - writer.WriteStartArray(); - foreach (var item in Sentences) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - internal static SentimentDocumentResult DeserializeSentimentDocumentResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - TextSentiment sentiment = default; - SentimentConfidenceScores confidenceScores = default; - IList sentences = default; string id = default; - IList warnings = default; + IReadOnlyList warnings = default; TextDocumentStatistics? statistics = default; + TextSentiment sentiment = default; + SentimentConfidenceScores confidenceScores = default; + IReadOnlyList sentences = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sentiment"u8)) - { - sentiment = property.Value.GetString().ToTextSentiment(); - continue; - } - if (property.NameEquals("confidenceScores"u8)) - { - confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value); - continue; - } - if (property.NameEquals("sentences"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SentenceSentimentInternal.DeserializeSentenceSentimentInternal(item)); - } - sentences = array; - continue; - } if (property.NameEquals("id"u8)) { id = property.Value.GetString(); @@ -102,6 +50,26 @@ internal static SentimentDocumentResult DeserializeSentimentDocumentResult(JsonE statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); continue; } + if (property.NameEquals("sentiment"u8)) + { + sentiment = property.Value.GetString().ToTextSentiment(); + continue; + } + if (property.NameEquals("confidenceScores"u8)) + { + confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value); + continue; + } + if (property.NameEquals("sentences"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SentenceSentimentInternal.DeserializeSentenceSentimentInternal(item)); + } + sentences = array; + continue; + } } return new SentimentDocumentResult( id, @@ -114,18 +82,10 @@ internal static SentimentDocumentResult DeserializeSentimentDocumentResult(JsonE /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new SentimentDocumentResult FromResponse(Response response) + internal static SentimentDocumentResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeSentimentDocumentResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.cs index 5f023dbc6821..1e8d07f07281 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentDocumentResult.cs @@ -11,23 +11,25 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentimentDocumentResult. - internal partial class SentimentDocumentResult : DocumentResult + /// An object representing the pre-built Sentiment Analysis results of each document. + internal partial class SentimentDocumentResult { /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// Document level sentiment confidence scores between 0 and 1 for each sentiment class. - /// Sentence level sentiment analysis. + /// The sentiment confidence score between 0 and 1 for the sentence for all classes. + /// The document's sentences sentiment. /// , , or is null. - public SentimentDocumentResult(string id, IEnumerable warnings, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IEnumerable sentences) : base(id, warnings) + internal SentimentDocumentResult(string id, IEnumerable warnings, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IEnumerable sentences) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); Argument.AssertNotNull(sentences, nameof(sentences)); + Id = id; + Warnings = warnings.ToList(); Sentiment = sentiment; ConfidenceScores = confidenceScores; Sentences = sentences.ToList(); @@ -38,20 +40,29 @@ public SentimentDocumentResult(string id, IEnumerable warnings, /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// Document level sentiment confidence scores between 0 and 1 for each sentiment class. - /// Sentence level sentiment analysis. - internal SentimentDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IList sentences) : base(id, warnings, statistics) + /// The sentiment confidence score between 0 and 1 for the sentence for all classes. + /// The document's sentences sentiment. + internal SentimentDocumentResult(string id, IReadOnlyList warnings, TextDocumentStatistics? statistics, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IReadOnlyList sentences) { + Id = id; + Warnings = warnings; + Statistics = statistics; Sentiment = sentiment; ConfidenceScores = confidenceScores; Sentences = sentences; } + /// Unique, non-empty document identifier. + public string Id { get; } + /// Warnings encountered while processing document. + public IReadOnlyList Warnings { get; } + /// if showStats=true was specified in the request this field will contain information about the document payload. + public TextDocumentStatistics? Statistics { get; } /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - public TextSentiment Sentiment { get; set; } - /// Document level sentiment confidence scores between 0 and 1 for each sentiment class. - public SentimentConfidenceScores ConfidenceScores { get; set; } - /// Sentence level sentiment analysis. - public IList Sentences { get; } + public TextSentiment Sentiment { get; } + /// The sentiment confidence score between 0 and 1 for the sentence for all classes. + public SentimentConfidenceScores ConfidenceScores { get; } + /// The document's sentences sentiment. + public IReadOnlyList Sentences { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.Serialization.cs index 9531872eea2f..5b370a5300b3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.Serialization.cs @@ -7,31 +7,11 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class SentimentLROResult : IUtf8JsonSerializable + internal partial class SentimentLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static SentimentLROResult DeserializeSentimentLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -39,10 +19,10 @@ internal static SentimentLROResult DeserializeSentimentLROResult(JsonElement ele return null; } SentimentResponse results = default; - AnalyzeTextLROResultsKind kind = default; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results"u8)) @@ -50,28 +30,28 @@ internal static SentimentLROResult DeserializeSentimentLROResult(JsonElement ele results = SentimentResponse.DeserializeSentimentResponse(property.Value); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new SentimentLROResult(lastUpdateDateTime, status, kind, taskName, results); + return new SentimentLROResult(lastUpdateDateTime, status, taskName, kind, results); } /// Deserializes the model from a raw response. @@ -81,13 +61,5 @@ internal static SentimentLROResult DeserializeSentimentLROResult(JsonElement ele using var document = JsonDocument.Parse(response.Content); return DeserializeSentimentLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.cs index 3074c6ef1bc1..cf8b295d17a5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentLROResult.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentimentLROResult. + /// Contains the Sentiment Analysis LRO results. internal partial class SentimentLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// The sentiment analysis results. /// is null. - public SentimentLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, SentimentResponse results) : base(lastUpdateDateTime, status) + internal SentimentLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, SentimentResponse results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -26,18 +26,18 @@ public SentimentLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperat } /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - /// - internal SentimentLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, SentimentResponse results) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + /// The sentiment analysis results. + internal SentimentLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind, SentimentResponse results) : base(lastUpdateDateTime, status, taskName, kind) { Results = results; Kind = kind; } - /// Gets or sets the results. - public SentimentResponse Results { get; set; } + /// The sentiment analysis results. + public SentimentResponse Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.Serialization.cs index 33effafc1492..4624223ede4d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.Serialization.cs @@ -7,61 +7,23 @@ using System.Collections.Generic; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class SentimentResponse : IUtf8JsonSerializable + internal partial class SentimentResponse { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - writer.WriteEndObject(); - } - internal static SentimentResponse DeserializeSentimentResponse(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList documents = default; - IList errors = default; + IReadOnlyList errors = default; TextDocumentBatchStatistics statistics = default; string modelVersion = default; + IReadOnlyList documents = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SentimentResponseDocumentsItem.DeserializeSentimentResponseDocumentsItem(item)); - } - documents = array; - continue; - } if (property.NameEquals("errors"u8)) { List array = new List(); @@ -86,24 +48,26 @@ internal static SentimentResponse DeserializeSentimentResponse(JsonElement eleme modelVersion = property.Value.GetString(); continue; } + if (property.NameEquals("documents"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SentimentDocumentResult.DeserializeSentimentDocumentResult(item)); + } + documents = array; + continue; + } } return new SentimentResponse(errors, statistics, modelVersion, documents); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new SentimentResponse FromResponse(Response response) + internal static SentimentResponse FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeSentimentResponse(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.cs index f17f6a25145a..6ac55985f2ea 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponse.cs @@ -11,20 +11,22 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentimentResponse. - internal partial class SentimentResponse : PreBuiltResult + /// Sentiment analysis results for the input documents. + internal partial class SentimentResponse { /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. - /// Sentiment analysis per document. + /// The sentiment analysis results for each document in the input. /// , or is null. - public SentimentResponse(IEnumerable errors, string modelVersion, IEnumerable documents) : base(errors, modelVersion) + internal SentimentResponse(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); Argument.AssertNotNull(documents, nameof(documents)); + Errors = errors.ToList(); + ModelVersion = modelVersion; Documents = documents.ToList(); } @@ -32,13 +34,22 @@ public SentimentResponse(IEnumerable errors, string modelVersion, /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. - /// Sentiment analysis per document. - internal SentimentResponse(IList errors, TextDocumentBatchStatistics statistics, string modelVersion, IList documents) : base(errors, statistics, modelVersion) + /// The sentiment analysis results for each document in the input. + internal SentimentResponse(IReadOnlyList errors, TextDocumentBatchStatistics statistics, string modelVersion, IReadOnlyList documents) { + Errors = errors; + Statistics = statistics; + ModelVersion = modelVersion; Documents = documents; } - /// Sentiment analysis per document. - public IList Documents { get; } + /// Errors by document id. + public IReadOnlyList Errors { get; } + /// if showStats=true was specified in the request this field will contain information about the request payload. + public TextDocumentBatchStatistics Statistics { get; } + /// This field indicates which model is used for scoring. + public string ModelVersion { get; } + /// The sentiment analysis results for each document in the input. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponseDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponseDocumentsItem.Serialization.cs deleted file mode 100644 index 431a7d6b618b..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponseDocumentsItem.Serialization.cs +++ /dev/null @@ -1,131 +0,0 @@ -// 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.AI.TextAnalytics.Models -{ - internal partial class SentimentResponseDocumentsItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment.ToSerialString()); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores); - writer.WritePropertyName("sentences"u8); - writer.WriteStartArray(); - foreach (var item in Sentences) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics); - } - writer.WriteEndObject(); - } - - internal static SentimentResponseDocumentsItem DeserializeSentimentResponseDocumentsItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TextSentiment sentiment = default; - SentimentConfidenceScores confidenceScores = default; - IList sentences = default; - string id = default; - IList warnings = default; - TextDocumentStatistics? statistics = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sentiment"u8)) - { - sentiment = property.Value.GetString().ToTextSentiment(); - continue; - } - if (property.NameEquals("confidenceScores"u8)) - { - confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value); - continue; - } - if (property.NameEquals("sentences"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SentenceSentimentInternal.DeserializeSentenceSentimentInternal(item)); - } - sentences = array; - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = TextDocumentStatistics.DeserializeTextDocumentStatistics(property.Value); - continue; - } - } - return new SentimentResponseDocumentsItem( - id, - warnings, - statistics, - sentiment, - confidenceScores, - sentences); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new SentimentResponseDocumentsItem FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSentimentResponseDocumentsItem(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponseDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponseDocumentsItem.cs deleted file mode 100644 index 77c87ba5f70a..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentResponseDocumentsItem.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The SentimentResponseDocumentsItem. - internal partial class SentimentResponseDocumentsItem : SentimentDocumentResult - { - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// Document level sentiment confidence scores between 0 and 1 for each sentiment class. - /// Sentence level sentiment analysis. - /// , , or is null. - public SentimentResponseDocumentsItem(string id, IEnumerable warnings, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IEnumerable sentences) : base(id, warnings, sentiment, confidenceScores, sentences) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); - Argument.AssertNotNull(sentences, nameof(sentences)); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// Document level sentiment confidence scores between 0 and 1 for each sentiment class. - /// Sentence level sentiment analysis. - internal SentimentResponseDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, TextSentiment sentiment, SentimentConfidenceScores confidenceScores, IList sentences) : base(id, warnings, statistics, sentiment, confidenceScores, sentences) - { - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentTaskResult.cs index c79d8c04f9fe..b9f2fbba1032 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SentimentTaskResult.cs @@ -9,11 +9,11 @@ namespace Azure.AI.TextAnalytics.Models { - /// The SentimentTaskResult. + /// Contains the analyze text SentimentAnalysis LRO task result. internal partial class SentimentTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// + /// The sentiment analysis results. /// is null. internal SentimentTaskResult(SentimentResponse results) { @@ -24,15 +24,15 @@ internal SentimentTaskResult(SentimentResponse results) } /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. - /// + /// The kind of task result. + /// The sentiment analysis results. internal SentimentTaskResult(AnalyzeTextTaskResultsKind kind, SentimentResponse results) : base(kind) { Results = results; Kind = kind; } - /// Gets the results. + /// The sentiment analysis results. public SentimentResponse Results { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/StringIndexType.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/StringIndexType.cs index 568833869e7e..1188ae7fb2d1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/StringIndexType.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/StringIndexType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - /// Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. + /// String index type. internal readonly partial struct StringIndexType : IEquatable { private readonly string _value; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs index bd46b71bfacc..cdbcede3cca4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class SummaryContextInternal : IUtf8JsonSerializable + internal partial class SummaryContextInternal { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - writer.WriteEndObject(); - } - internal static SummaryContextInternal DeserializeSummaryContextInternal(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -53,13 +42,5 @@ internal static SummaryContextInternal FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeSummaryContextInternal(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs index 488f7f8cdde5..e830a89b8e85 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs @@ -13,15 +13,15 @@ internal partial class SummaryContextInternal /// Initializes a new instance of . /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. - public SummaryContextInternal(int offset, int length) + internal SummaryContextInternal(int offset, int length) { Offset = offset; Length = length; } /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. - public int Offset { get; set; } + public int Offset { get; } /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. - public int Length { get; set; } + public int Length { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.Serialization.cs index c65f4729a64c..4b82ff9ffa0e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class TargetConfidenceScoreLabel : IUtf8JsonSerializable + internal partial class TargetConfidenceScoreLabel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("positive"u8); - writer.WriteNumberValue(Positive); - writer.WritePropertyName("negative"u8); - writer.WriteNumberValue(Negative); - writer.WriteEndObject(); - } - internal static TargetConfidenceScoreLabel DeserializeTargetConfidenceScoreLabel(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -53,13 +42,5 @@ internal static TargetConfidenceScoreLabel FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeTargetConfidenceScoreLabel(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.cs index a5fd885e39e7..16ffd92b8856 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetConfidenceScoreLabel.cs @@ -13,15 +13,15 @@ internal partial class TargetConfidenceScoreLabel /// Initializes a new instance of . /// Confidence score for positive sentiment. /// Confidence score for negative sentiment. - public TargetConfidenceScoreLabel(double positive, double negative) + internal TargetConfidenceScoreLabel(double positive, double negative) { Positive = positive; Negative = negative; } /// Confidence score for positive sentiment. - public double Positive { get; set; } + public double Positive { get; } /// Confidence score for negative sentiment. - public double Negative { get; set; } + public double Negative { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.Serialization.cs index f373d0a9d3ce..78bd26bf3f0e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.Serialization.cs @@ -6,44 +6,33 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class TargetRelation : IUtf8JsonSerializable + internal partial class TargetRelation { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("relationType"u8); - writer.WriteStringValue(RelationType.ToSerialString()); - writer.WritePropertyName("ref"u8); - writer.WriteStringValue(Ref); - writer.WriteEndObject(); - } - internal static TargetRelation DeserializeTargetRelation(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - TargetRelationType relationType = default; string @ref = default; + TargetRelationType relationType = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("relationType"u8)) + if (property.NameEquals("ref"u8)) { - relationType = property.Value.GetString().ToTargetRelationType(); + @ref = property.Value.GetString(); continue; } - if (property.NameEquals("ref"u8)) + if (property.NameEquals("relationType"u8)) { - @ref = property.Value.GetString(); + relationType = property.Value.GetString().ToTargetRelationType(); continue; } } - return new TargetRelation(relationType, @ref); + return new TargetRelation(@ref, relationType); } /// Deserializes the model from a raw response. @@ -53,13 +42,5 @@ internal static TargetRelation FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeTargetRelation(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.cs index a595cedd0ca0..7959443414ea 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TargetRelation.cs @@ -9,24 +9,24 @@ namespace Azure.AI.TextAnalytics.Models { - /// The TargetRelation. + /// Represents the relation between assessments and/or targets. internal partial class TargetRelation { /// Initializes a new instance of . - /// The type related to the target. /// The JSON pointer indicating the linked object. + /// The type related to the target. /// is null. - public TargetRelation(TargetRelationType relationType, string @ref) + internal TargetRelation(string @ref, TargetRelationType relationType) { Argument.AssertNotNull(@ref, nameof(@ref)); - RelationType = relationType; Ref = @ref; + RelationType = relationType; } - /// The type related to the target. - public TargetRelationType RelationType { get; set; } /// The JSON pointer indicating the linked object. - public string Ref { get; set; } + public string Ref { get; } + /// The type related to the target. + public TargetRelationType RelationType { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskIdentifier.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskIdentifier.Serialization.cs deleted file mode 100644 index b5f499224ac6..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskIdentifier.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class TaskIdentifier : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WriteEndObject(); - } - - internal static TaskIdentifier DeserializeTaskIdentifier(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new TaskIdentifier(taskName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static TaskIdentifier FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTaskIdentifier(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskIdentifier.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskIdentifier.cs deleted file mode 100644 index f78d1e8a48e8..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskIdentifier.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// Base task object. - internal partial class TaskIdentifier - { - /// Initializes a new instance of . - public TaskIdentifier() - { - } - - /// Initializes a new instance of . - /// - internal TaskIdentifier(string taskName) - { - TaskName = taskName; - } - - /// Gets or sets the task name. - public string TaskName { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskParameters.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskParameters.Serialization.cs deleted file mode 100644 index 3c281c4bc939..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskParameters.Serialization.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class TaskParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WriteEndObject(); - } - - internal static TaskParameters DeserializeTaskParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? loggingOptOut = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - } - return new TaskParameters(loggingOptOut); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static TaskParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTaskParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskParameters.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskParameters.cs deleted file mode 100644 index 495f0fe7e626..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskParameters.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// Base parameters object for a text analysis task. - internal partial class TaskParameters - { - /// Initializes a new instance of . - public TaskParameters() - { - } - - /// Initializes a new instance of . - /// - internal TaskParameters(bool? loggingOptOut) - { - LoggingOptOut = loggingOptOut; - } - - /// Gets or sets the logging opt out. - public bool? LoggingOptOut { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskState.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskState.Serialization.cs deleted file mode 100644 index 414966c13e58..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskState.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class TaskState : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - - internal static TaskState DeserializeTaskState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DateTimeOffset lastUpdateDateTime = default; - TextAnalyticsOperationStatus status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("lastUpdateDateTime"u8)) - { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); - continue; - } - } - return new TaskState(lastUpdateDateTime, status); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static TaskState FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTaskState(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskState.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskState.cs deleted file mode 100644 index ba59841c4775..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TaskState.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The TaskState. - internal partial class TaskState - { - /// Initializes a new instance of . - /// - /// - public TaskState(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status) - { - LastUpdateDateTime = lastUpdateDateTime; - Status = status; - } - - /// Gets or sets the last update date time. - public DateTimeOffset LastUpdateDateTime { get; set; } - /// Gets or sets the status. - public TextAnalyticsOperationStatus Status { get; set; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Tasks.Serialization.cs similarity index 85% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.Serialization.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Tasks.Serialization.cs index 1095e91649ae..00d3118e3430 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Tasks.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.AI.TextAnalytics.Models { - internal partial class AnalyzeTasks + internal partial class Tasks { - internal static AnalyzeTasks DeserializeAnalyzeTasks(JsonElement element) + internal static Tasks DeserializeTasks(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -60,15 +60,15 @@ internal static AnalyzeTasks DeserializeAnalyzeTasks(JsonElement element) continue; } } - return new AnalyzeTasks(completed, failed, inProgress, total, items ?? new ChangeTrackingList()); + return new Tasks(completed, failed, inProgress, total, items ?? new ChangeTrackingList()); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AnalyzeTasks FromResponse(Response response) + internal static Tasks FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAnalyzeTasks(document.RootElement); + return DeserializeTasks(document.RootElement); } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Tasks.cs similarity index 64% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Tasks.cs index dfb2aaacde11..f25e08b0c874 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Tasks.cs @@ -9,15 +9,15 @@ namespace Azure.AI.TextAnalytics.Models { - /// The TasksStateTasks. - internal partial class AnalyzeTasks + /// Container for the tasks status for the LRO job. + internal partial class Tasks { - /// Initializes a new instance of . - /// - /// - /// - /// - internal AnalyzeTasks(int completed, int failed, int inProgress, int total) + /// Initializes a new instance of . + /// Count of completed tasks. + /// Count of failed tasks. + /// Count of inprogress tasks. + /// Count of total tasks. + internal Tasks(int completed, int failed, int inProgress, int total) { Completed = completed; Failed = failed; @@ -26,16 +26,17 @@ internal AnalyzeTasks(int completed, int failed, int inProgress, int total) Items = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// - /// - /// - /// + /// Initializes a new instance of . + /// Count of completed tasks. + /// Count of failed tasks. + /// Count of inprogress tasks. + /// Count of total tasks. /// + /// Enumerable of Analyze text job results. /// 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 AnalyzeTasks(int completed, int failed, int inProgress, int total, IReadOnlyList items) + internal Tasks(int completed, int failed, int inProgress, int total, IReadOnlyList items) { Completed = completed; Failed = failed; @@ -44,16 +45,16 @@ internal AnalyzeTasks(int completed, int failed, int inProgress, int total, IRea Items = items; } - /// Gets the completed. + /// Count of completed tasks. public int Completed { get; } - /// Gets the failed. + /// Count of failed tasks. public int Failed { get; } - /// Gets the in progress. + /// Count of inprogress tasks. public int InProgress { get; } - /// Gets the total. + /// Count of total tasks. public int Total { get; } /// - /// Gets the items + /// Enumerable of Analyze text job results. /// 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 . /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TasksState.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TasksState.Serialization.cs deleted file mode 100644 index 36b44f167d4e..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TasksState.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class TasksState - { - internal static TasksState DeserializeTasksState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AnalyzeTasks tasks = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tasks"u8)) - { - tasks = AnalyzeTasks.DeserializeAnalyzeTasks(property.Value); - continue; - } - } - return new TasksState(tasks); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static TasksState FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTasksState(document.RootElement); - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TasksState.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TasksState.cs deleted file mode 100644 index 1d37bb1bebd0..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TasksState.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.AI.TextAnalytics.Models -{ - /// The TasksState. - internal partial class TasksState - { - /// Initializes a new instance of . - /// - /// is null. - internal TasksState(AnalyzeTasks tasks) - { - Argument.AssertNotNull(tasks, nameof(tasks)); - - Tasks = tasks; - } - - /// Gets the tasks. - public AnalyzeTasks Tasks { get; } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextAnalyticsOperationStatus.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextAnalyticsOperationStatus.cs index 52e0d5d885a3..c3ae113e1c92 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextAnalyticsOperationStatus.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextAnalyticsOperationStatus.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics { - /// The State. + /// The status of the task at the mentioned last update time. public readonly partial struct TextAnalyticsOperationStatus : IEquatable { private readonly string _value; @@ -25,25 +25,25 @@ public TextAnalyticsOperationStatus(string value) private const string NotStartedValue = "notStarted"; private const string RunningValue = "running"; private const string SucceededValue = "succeeded"; + private const string PartiallyCompletedValue = "partiallyCompleted"; private const string FailedValue = "failed"; private const string CancelledValue = "cancelled"; private const string CancellingValue = "cancelling"; - private const string PartiallyCompletedValue = "partiallyCompleted"; - /// notStarted. + /// Not started status. public static TextAnalyticsOperationStatus NotStarted { get; } = new TextAnalyticsOperationStatus(NotStartedValue); - /// running. + /// Running status. public static TextAnalyticsOperationStatus Running { get; } = new TextAnalyticsOperationStatus(RunningValue); - /// succeeded. + /// Succeeded status. public static TextAnalyticsOperationStatus Succeeded { get; } = new TextAnalyticsOperationStatus(SucceededValue); - /// failed. + /// Partially completed status. + public static TextAnalyticsOperationStatus PartiallyCompleted { get; } = new TextAnalyticsOperationStatus(PartiallyCompletedValue); + /// Failed status. public static TextAnalyticsOperationStatus Failed { get; } = new TextAnalyticsOperationStatus(FailedValue); - /// cancelled. + /// Cancelled status. public static TextAnalyticsOperationStatus Cancelled { get; } = new TextAnalyticsOperationStatus(CancelledValue); - /// cancelling. + /// Cancelling status. public static TextAnalyticsOperationStatus Cancelling { get; } = new TextAnalyticsOperationStatus(CancellingValue); - /// partiallyCompleted. - public static TextAnalyticsOperationStatus PartiallyCompleted { get; } = new TextAnalyticsOperationStatus(PartiallyCompletedValue); /// Determines if two values are the same. public static bool operator ==(TextAnalyticsOperationStatus left, TextAnalyticsOperationStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentBatchStatistics.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentBatchStatistics.Serialization.cs index 028d17db1a0c..08909f1aa57d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentBatchStatistics.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentBatchStatistics.Serialization.cs @@ -6,26 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics { - public partial class TextDocumentBatchStatistics : IUtf8JsonSerializable + public partial class TextDocumentBatchStatistics { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("documentsCount"u8); - writer.WriteNumberValue(DocumentCount); - writer.WritePropertyName("validDocumentsCount"u8); - writer.WriteNumberValue(ValidDocumentCount); - writer.WritePropertyName("erroneousDocumentsCount"u8); - writer.WriteNumberValue(InvalidDocumentCount); - writer.WritePropertyName("transactionsCount"u8); - writer.WriteNumberValue(TransactionCount); - writer.WriteEndObject(); - } - internal static TextDocumentBatchStatistics DeserializeTextDocumentBatchStatistics(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -69,13 +54,5 @@ internal static TextDocumentBatchStatistics FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeTextDocumentBatchStatistics(document.RootElement); } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentStatistics.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentStatistics.Serialization.cs index 2db251fd6f75..ee0f738f4647 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentStatistics.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/TextDocumentStatistics.Serialization.cs @@ -6,22 +6,11 @@ #nullable disable using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics { - public partial struct TextDocumentStatistics : IUtf8JsonSerializable + public partial struct TextDocumentStatistics { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("charactersCount"u8); - writer.WriteNumberValue(CharacterCount); - writer.WritePropertyName("transactionsCount"u8); - writer.WriteNumberValue(TransactionCount); - writer.WriteEndObject(); - } - internal static TextDocumentStatistics DeserializeTextDocumentStatistics(JsonElement element) { int charactersCount = default; @@ -49,13 +38,5 @@ internal static TextDocumentStatistics FromResponse(Response response) using var document = JsonDocument.Parse(response.Content); return DeserializeTextDocumentStatistics(document.RootElement); } - - /// Convert into a . - internal RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.Serialization.cs index 85560ae95565..99b5acf2e99c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.Serialization.cs @@ -7,63 +7,45 @@ using System; using System.Text.Json; -using Azure.Core; namespace Azure.AI.TextAnalytics.Models { - internal partial class UnknownAnalyzeTextLROResult : IUtf8JsonSerializable + internal partial class UnknownAnalyzeTextLROResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WritePropertyName("lastUpdateDateTime"u8); - writer.WriteStringValue(LastUpdateDateTime, "O"); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WriteEndObject(); - } - internal static UnknownAnalyzeTextLROResult DeserializeUnknownAnalyzeTextLROResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - AnalyzeTextLROResultsKind kind = "Unknown"; - string taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; + string taskName = default; + AnalyzeTextLROResultsKind kind = "Unknown"; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("lastUpdateDateTime"u8)) { - kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); + lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("taskName"u8)) + if (property.NameEquals("status"u8)) { - taskName = property.Value.GetString(); + status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } - if (property.NameEquals("lastUpdateDateTime"u8)) + if (property.NameEquals("taskName"u8)) { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); + taskName = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("kind"u8)) { - status = new TextAnalyticsOperationStatus(property.Value.GetString()); + kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } } - return new UnknownAnalyzeTextLROResult(lastUpdateDateTime, status, kind, taskName); + return new UnknownAnalyzeTextLROResult(lastUpdateDateTime, status, taskName, kind); } /// Deserializes the model from a raw response. @@ -73,13 +55,5 @@ internal static UnknownAnalyzeTextLROResult DeserializeUnknownAnalyzeTextLROResu using var document = JsonDocument.Parse(response.Content); return DeserializeUnknownAnalyzeTextLROResult(document.RootElement); } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.cs index c0cd7664f0b0..165b2f79f81b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROResult.cs @@ -13,11 +13,11 @@ namespace Azure.AI.TextAnalytics.Models internal partial class UnknownAnalyzeTextLROResult : AnalyzeTextLROResult { /// Initializes a new instance of . - /// - /// - /// Enumeration of supported Text Analysis long-running operation task results. - /// - internal UnknownAnalyzeTextLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName) : base(lastUpdateDateTime, status, kind, taskName) + /// The last updated time in UTC for the task. + /// The status of the task at the mentioned last update time. + /// task name. + /// Kind of the task. + internal UnknownAnalyzeTextLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, string taskName, AnalyzeTextLROResultsKind kind) : base(lastUpdateDateTime, status, taskName, kind) { Kind = kind; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROTask.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROTask.Serialization.cs deleted file mode 100644 index 93294168dcee..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROTask.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.TextAnalytics.Models -{ - internal partial class UnknownAnalyzeTextLROTask : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(TaskName)) - { - writer.WritePropertyName("taskName"u8); - writer.WriteStringValue(TaskName); - } - writer.WriteEndObject(); - } - - internal static UnknownAnalyzeTextLROTask DeserializeUnknownAnalyzeTextLROTask(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AnalyzeTextLROTaskKind kind = "Unknown"; - string taskName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextLROTaskKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - } - return new UnknownAnalyzeTextLROTask(taskName, kind); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new UnknownAnalyzeTextLROTask FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownAnalyzeTextLROTask(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROTask.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROTask.cs deleted file mode 100644 index 97ce51e05c78..000000000000 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextLROTask.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.AI.TextAnalytics.Models -{ - /// Unknown version of AnalyzeTextLROTask. - internal partial class UnknownAnalyzeTextLROTask : AnalyzeTextLROTask - { - /// Initializes a new instance of . - /// - /// Enumeration of supported long-running Text Analysis tasks. - internal UnknownAnalyzeTextLROTask(string taskName, AnalyzeTextLROTaskKind kind) : base(taskName, kind) - { - Kind = kind; - } - } -} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextTaskResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextTaskResult.cs index 3dcb18adc922..e60bd7fb241f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextTaskResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/UnknownAnalyzeTextTaskResult.cs @@ -11,7 +11,7 @@ namespace Azure.AI.TextAnalytics.Models internal partial class UnknownAnalyzeTextTaskResult : AnalyzeTextTaskResult { /// Initializes a new instance of . - /// Enumeration of supported Text Analysis task results. + /// The kind of task result. internal UnknownAnalyzeTextTaskResult(AnalyzeTextTaskResultsKind kind) : base(kind) { Kind = kind; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/TextAnalyticsModelFactory.cs index 9556c557bacb..69e607e9fa49 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/TextAnalyticsModelFactory.cs @@ -5,6 +5,9 @@ #nullable disable +using System; +using System.Collections.Generic; + namespace Azure.AI.TextAnalytics { /// Model factory for models. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/autorest.md b/sdk/textanalytics/Azure.AI.TextAnalytics/src/autorest.md index d94ea8061331..820f146b10d3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/autorest.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/autorest.md @@ -7,7 +7,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/53240ebc58b3c4e99de723194032064db1d97e63/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json +- https://github.com/Azure/azure-rest-api-specs/blob/ce46dc3e04b0bc3a7b04d9c715c1107186978a5c/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json generation1-convenience-client: true ``` diff --git a/sdk/trafficmanager/ci.mgmt.yml b/sdk/trafficmanager/ci.mgmt.yml index 528f78b70b96..86b17c08ac4e 100644 --- a/sdk/trafficmanager/ci.mgmt.yml +++ b/sdk/trafficmanager/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/trafficmanager/ci.mgmt.yml - sdk/trafficmanager/Azure.ResourceManager.TrafficManager/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/trafficmanager/ci.mgmt.yml + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/trustedsigning/ci.mgmt.yml b/sdk/trustedsigning/ci.mgmt.yml index 5b67358a4477..07fb171ee416 100644 --- a/sdk/trustedsigning/ci.mgmt.yml +++ b/sdk/trustedsigning/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/trustedsigning/ci.mgmt.yml - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/trustedsigning/ci.mgmt.yml + - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/voiceservices/ci.mgmt.yml b/sdk/voiceservices/ci.mgmt.yml index a914d1640296..64ea2eb63c0f 100644 --- a/sdk/voiceservices/ci.mgmt.yml +++ b/sdk/voiceservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/voiceservices/ci.mgmt.yml - sdk/voiceservices/Azure.ResourceManager.VoiceServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/voiceservices/ci.mgmt.yml + - sdk/voiceservices/Azure.ResourceManager.VoiceServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/webpubsub/ci.mgmt.yml b/sdk/webpubsub/ci.mgmt.yml index 6bcb8439a2b0..a312a96feb5a 100644 --- a/sdk/webpubsub/ci.mgmt.yml +++ b/sdk/webpubsub/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/webpubsub/ci.mgmt.yml - sdk/webpubsub/Azure.ResourceManager.WebPubSub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/webpubsub/ci.mgmt.yml + - sdk/webpubsub/Azure.ResourceManager.WebPubSub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/websites/ci.mgmt.yml b/sdk/websites/ci.mgmt.yml index d67c580bc414..4dbf184acc87 100644 --- a/sdk/websites/ci.mgmt.yml +++ b/sdk/websites/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/websites/ci.mgmt.yml - sdk/websites/Azure.ResourceManager.AppService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/websites/ci.mgmt.yml + - sdk/websites/Azure.ResourceManager.AppService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloadmonitor/ci.mgmt.yml b/sdk/workloadmonitor/ci.mgmt.yml index 7c6a51fbe75c..e834be340ea9 100644 --- a/sdk/workloadmonitor/ci.mgmt.yml +++ b/sdk/workloadmonitor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/workloadmonitor/ci.mgmt.yml - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadmonitor/ci.mgmt.yml + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloads/ci.mgmt.yml b/sdk/workloads/ci.mgmt.yml index e3457d69ceaa..bf3983053473 100644 --- a/sdk/workloads/ci.mgmt.yml +++ b/sdk/workloads/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/workloads/ci.mgmt.yml - sdk/workloads/Azure.ResourceManager.Workloads/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloads/ci.mgmt.yml + - sdk/workloads/Azure.ResourceManager.Workloads/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln new file mode 100644 index 000000000000..d20c0df9296c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SapVirtualInstances", "src\Azure.ResourceManager.SapVirtualInstances.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SapVirtualInstances.Tests", "tests\Azure.ResourceManager.SapVirtualInstances.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md new file mode 100644 index 000000000000..c2d813e761af --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md @@ -0,0 +1,86 @@ +# Azure.ResourceManager.SapVirtualInstances client library for .NET + +Azure.ResourceManager.SapVirtualInstances 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/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.ResourceManager.SapVirtualInstances --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. + +## 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.png) diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs new file mode 100644 index 000000000000..70a19c898099 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapApplicationServerInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SAPApplicationServerInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Create.json + // this example is just showing the usage of "SAPApplicationServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapApplicationServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data); + SapApplicationServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPApplicationServerInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPApplicationServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapApplicationServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data); + SapApplicationServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceResource result = await collection.GetAsync(applicationInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SapApplicationServerInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_ListBySapVirtualInstance.json + // this example is just showing the usage of "SAPApplicationServerInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation and iterate over the result + await foreach (SapApplicationServerInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + bool result = await collection.ExistsAsync(applicationInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + NullableResponse response = await collection.GetIfExistsAsync(applicationInstanceName); + SapApplicationServerInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs new file mode 100644 index 000000000000..a754e7233cd3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapApplicationServerInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + SapApplicationServerInstanceResource result = await sapApplicationServerInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPApplicationServerInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Delete.json + // this example is just showing the usage of "SAPApplicationServerInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + await sapApplicationServerInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPApplicationServerInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Update.json + // this example is just showing the usage of "SAPApplicationServerInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + SapApplicationServerInstancePatch patch = new SapApplicationServerInstancePatch + { + Tags = +{ +["tag1"] = "value1" +}, + }; + SapApplicationServerInstanceResource result = await sapApplicationServerInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstance.json + // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartVirtualMachineAndTheSAPApplicationServerInstanceOnIt() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstance.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPApplicationServerInstanceAndItSInfrastructure() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceInfrastructure.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoft.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheSAPApplicationServerInstanceAndItSInfrastructure() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoftInfrastructure.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs new file mode 100644 index 000000000000..6984bc34d5d5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapCentralServerInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SapCentralServerInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Create.json + // this example is just showing the usage of "SAPCentralServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapCentralServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data); + SapCentralServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPCentralInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPCentralServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapCentralServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data); + SapCentralServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceResource result = await collection.GetAsync(centralInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPCentralInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapCentralServerInstances_ListBySapVirtualInstance.json + // this example is just showing the usage of "SAPCentralServerInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation and iterate over the result + await foreach (SapCentralServerInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + bool result = await collection.ExistsAsync(centralInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + NullableResponse response = await collection.GetIfExistsAsync(centralInstanceName); + SapCentralServerInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs new file mode 100644 index 000000000000..c51a9b913e79 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapCentralServerInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + SapCentralServerInstanceResource result = await sapCentralServerInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SapCentralServerInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Delete.json + // this example is just showing the usage of "SAPCentralServerInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + await sapCentralServerInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SapCentralServerInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Update.json + // this example is just showing the usage of "SAPCentralServerInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + SapCentralServerInstancePatch patch = new SapCentralServerInstancePatch + { + Tags = +{ +["tag1"] = "value1" +}, + }; + SapCentralServerInstanceResource result = await sapCentralServerInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheSAPCentralServicesInstance() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstance.json + // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheVirtualMachineSAndTheSAPCentralServicesInstanceOnIt() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPCentralServicesInstance() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstance.json + // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 1200L, + }; + ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPCentralServicesInstanceAndItsUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstanceVM.json + // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + DeallocateVm = true, + }; + ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs new file mode 100644 index 000000000000..57e19fd4683b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapDatabaseInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SAPDatabaseInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Create.json + // this example is just showing the usage of "SAPDatabaseInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapDatabaseProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data); + SapDatabaseInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPDatabaseInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPDatabaseInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapDatabaseProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data); + SapDatabaseInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceResource result = await collection.GetAsync(databaseInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPDatabaseInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_List.json + // this example is just showing the usage of "SAPDatabaseInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation and iterate over the result + await foreach (SapDatabaseInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + bool result = await collection.ExistsAsync(databaseInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + NullableResponse response = await collection.GetIfExistsAsync(databaseInstanceName); + SapDatabaseInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs new file mode 100644 index 000000000000..de8c748921e3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapDatabaseInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + SapDatabaseInstanceResource result = await sapDatabaseInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPDatabaseInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Delete.json + // this example is just showing the usage of "SAPDatabaseInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + await sapDatabaseInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPDatabaseInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Update.json + // this example is just showing the usage of "SAPDatabaseInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + SapDatabaseInstancePatch patch = new SapDatabaseInstancePatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + SapDatabaseInstanceResource result = await sapDatabaseInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstance.json + // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartVirtualMachineAndTheDatabaseInstanceOfTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstance.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoft.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoftVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs new file mode 100644 index 000000000000..8bcb10e14ac1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs @@ -0,0 +1,3485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapVirtualInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnADistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("{{resourcegrp}}", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 2L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L)) + { + IsSecondaryIPEnabled = true, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = +{ +["created by"] = "azureuser" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnASingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsDSRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilitySetRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilitySetRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilityZoneRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilityZoneRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsSingleServerRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 5L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithAzureComputeGalleryImage() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsComputeGalleryImage.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +DataDiskNames = +{ +["default"] = {"ascsdisk0"} +}, +}}, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = {"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = {"app1disk0"} +}, +}}, + AvailabilitySetName = "appAvSet", + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvm", +HostName = "dbhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbnic", +}}, +OSDiskName = "dbosdisk", +DataDiskNames = +{ +["hanaData"] = {"hanadata0", "hanadata1"}, +["hanaLog"] = {"hanalog0", "hanalog1", "hanalog2"}, +["hanaShared"] = {"hanashared0", "hanashared1"}, +["usrSap"] = {"usrsap0"} +}, +}}, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +}, new VirtualMachineResourceNames +{ +VmName = "ersvm", +HostName = "ershostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ersnic", +}}, +OSDiskName = "ersosdisk", +}}, + AvailabilitySetName = "csAvSet", + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "ascslb", + FrontendIPConfigurationNames = { "ascsip0", "ersip0" }, + BackendPoolNames = { "ascsBackendPool" }, + HealthProbeNames = { "ascsHealthProbe", "ersHealthProbe" }, + }, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = {"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = {"app1disk0"} +}, +}}, + AvailabilitySetName = "appAvSet", + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvmpr", +HostName = "dbprhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbprnic", +}}, +OSDiskName = "dbprosdisk", +DataDiskNames = +{ +["hanaData"] = {"hanadatapr0", "hanadatapr1"}, +["hanaLog"] = {"hanalogpr0", "hanalogpr1", "hanalogpr2"}, +["hanaShared"] = {"hanasharedpr0", "hanasharedpr1"}, +["usrSap"] = {"usrsappr0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "dbvmsr", +HostName = "dbsrhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbsrnic", +}}, +OSDiskName = "dbsrosdisk", +DataDiskNames = +{ +["hanaData"] = {"hanadatasr0", "hanadatasr1"}, +["hanaLog"] = {"hanalogsr0", "hanalogsr1", "hanalogsr2"}, +["hanaShared"] = {"hanasharedsr0", "hanasharedsr1"}, +["usrSap"] = {"usrsapsr0"} +}, +}}, + AvailabilitySetName = "dbAvSet", + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "dblb", + FrontendIPConfigurationNames = { "dbip" }, + BackendPoolNames = { "dbBackendPool" }, + HealthProbeNames = { "dbHealthProbe" }, + }, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +}, new VirtualMachineResourceNames +{ +VmName = "ersvm", +HostName = "ershostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ersnic", +}}, +OSDiskName = "ersosdisk", +}}, + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "ascslb", + FrontendIPConfigurationNames = { "ascsip0", "ersip0" }, + BackendPoolNames = { "ascsBackendPool" }, + HealthProbeNames = { "ascsHealthProbe", "ersHealthProbe" }, + }, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = {"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = {"app1disk0"} +}, +}}, + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvmpr", +HostName = "dbprhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbprnic", +}}, +OSDiskName = "dbprosdisk", +DataDiskNames = +{ +["hanaData"] = {"hanadatapr0", "hanadatapr1"}, +["hanaLog"] = {"hanalogpr0", "hanalogpr1", "hanalogpr2"}, +["hanaShared"] = {"hanasharedpr0", "hanasharedpr1"}, +["usrSap"] = {"usrsappr0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "dbvmsr", +HostName = "dbsrhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbsrnic", +}}, +OSDiskName = "dbsrosdisk", +DataDiskNames = +{ +["hanaData"] = {"hanadatasr0", "hanadatasr1"}, +["hanaLog"] = {"hanalogsr0", "hanalogsr1", "hanalogsr2"}, +["hanaShared"] = {"hanasharedsr0", "hanasharedsr1"}, +["usrSap"] = {"usrsapsr0"} +}, +}}, + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "dblb", + FrontendIPConfigurationNames = { "dbip" }, + BackendPoolNames = { "dbBackendPool" }, + HealthProbeNames = { "dbHealthProbe" }, + }, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForDistributedSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsDSRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilitySetRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilitySetRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilityZoneRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilityZoneRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForSingleServerSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsSIngleServerRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithAnExistingSAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithExistingFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new MountFileShareConfiguration("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"), + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithANewSAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithNewFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new CreateAndMountFileShareConfiguration + { + ResourceGroup = "rgName", + StorageAccountName = "storageName", + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithTrustedAccessEnabled() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithOsTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }) + { + ManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }, + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithoutASAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithoutFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new SkipFileShareConfiguration(), + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstallSAPSoftwareOnDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("{{resourcegrp}}", new CentralServerConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 2L), new DatabaseConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L)) + { + IsSecondaryIPEnabled = true, + }, + SoftwareConfiguration = new SapInstallWithoutOSConfigSoftwareConfiguration("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "SAP S/4HANA 1909 SPS 03"), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = +{ +["created by"] = "azureuser" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstallSAPSoftwareOnSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("test-rg", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "SUSE", + Offer = "SLES-SAP", + Sku = "12-sp4-gen2", + Version = "2022.02.01", + }, new OSProfile + { + AdminUsername = "azureappadmin", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + })), + SoftwareConfiguration = new SapInstallWithoutOSConfigSoftwareConfiguration("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "SAP S/4HANA 1909 SPS 03"), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutions() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutions.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }), + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutionsWithOptionalCustomizations() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutionsCustom.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + ManagedRgStorageAccountName = "q20saacssgrs", + }), + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterWithTrustedAccessEnabled() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterWithTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }) + { + ManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }, + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPVirtualInstancesListByResourceGroup() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_ListByResourceGroup.json + // this example is just showing the usage of "SAPVirtualInstance_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation and iterate over the result + await foreach (SapVirtualInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + bool result = await collection.ExistsAsync(sapVirtualInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + bool result = await collection.ExistsAsync(sapVirtualInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName); + SapVirtualInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName); + SapVirtualInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs new file mode 100644 index 000000000000..e9b0f6980c31 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapVirtualInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstanceResource result = await sapVirtualInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstanceResource result = await sapVirtualInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPVirtualInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Delete.json + // this example is just showing the usage of "SAPVirtualInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + await sapVirtualInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPVirtualInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Update.json + // this example is just showing the usage of "SAPVirtualInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstancePatch patch = new SapVirtualInstancePatch + { + Tags = +{ +["key1"] = "svi1" +}, + Identity = new SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType.None), + }; + ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPVirtualInstancesTrustedAccessEnableUpdate() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_UpdateTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstancePatch patch = new SapVirtualInstancePatch + { + Tags = +{ +["key1"] = "svi1" +}, + Identity = new SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType.None), + UpdateSapVirtualInstanceManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }; + ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_SAPVirtualInstancesStart() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Start.json + // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_SAPVirtualInstancesStartWithInfraOperations() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_StartWithInfraOperations.json + // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopOfSapVirtualInstancesStop() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStop.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheVirtualMachineSAndTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStopVMAndSystem.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SAPVirtualInstancesStop() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Stop.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheVirtualMachineSAndTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_StopVMAndSystem.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..69c4c67630cd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapVirtualInstances_SAPVirtualInstancesListBySubscription() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_ListBySubscription.json + // this example is just showing the usage of "SAPVirtualInstance_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (SapVirtualInstanceResource item in subscriptionResource.GetSapVirtualInstancesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForNonHADistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_Distributed.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 20000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvSet.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 75000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvZone.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 75000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForSingleServer() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_SingleServer.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.NonProd, + SapProductType.S4HANA, + SapDeploymentType.SingleServer, + 60000L, + 2000L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedNonHAEnvironment() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_Distributed.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA); + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedHAEnvironmentWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvSet.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }; + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSkusForHAWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvZone.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }; + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForSingleServer() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_SingleServer.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.NonProd, SapProductType.S4HANA, SapDeploymentType.SingleServer, SapDatabaseType.HANA); + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentNonProd() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_NonProd.json + // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapDiskConfigurationsContent content = new SapDiskConfigurationsContent( + "eastus", + SapEnvironmentType.NonProd, + SapProductType.S4HANA, + SapDatabaseType.HANA, + SapDeploymentType.ThreeTier, + "Standard_M32ts"); + SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentProd() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_Prod.json + // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapDiskConfigurationsContent content = new SapDiskConfigurationsContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDatabaseType.HANA, + SapDeploymentType.ThreeTier, + "Standard_M32ts"); + SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInEastUs() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_eastus.json + // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent("eastus", SapProductType.S4HANA, SapDatabaseType.HANA); + SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInNorthEurope() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_northeurope.json + // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("northeurope"); + SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent("northeurope", SapProductType.S4HANA, SapDatabaseType.HANA); + SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj new file mode 100644 index 000000000000..6b36dd4baaa4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj @@ -0,0 +1,10 @@ + + + This is the Azure.ResourceManager.SapVirtualInstances client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.ResourceManager.SapVirtualInstances for Azure Data Plane + 1.0.0-beta.1 + Azure.ResourceManager.SapVirtualInstances + $(RequiredTargetFrameworks) + true + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs new file mode 100644 index 000000000000..17829d826737 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs @@ -0,0 +1,565 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Model factory for models. + public static partial class ArmSapVirtualInstancesModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapApplicationServerInstanceData SapApplicationServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapApplicationServerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapApplicationServerInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// Application server instance dispatcher status. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the Application Instance errors. + /// A new instance for mocking. + public static SapApplicationServerProperties SapApplicationServerProperties(string instanceNo = null, string subnet = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, string ipAddress = null, long? gatewayPort = null, long? icmHttpPort = null, long? icmHttpsPort = null, string dispatcherStatus = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapApplicationServerProperties( + instanceNo, + subnet, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + gatewayPort, + icmHttpPort, + icmHttpsPort, + dispatcherStatus, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + health, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of application server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static ApplicationServerVmDetails ApplicationServerVmDetails(ApplicationServerVirtualMachineType? type = null, string virtualMachineId = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new ApplicationServerVmDetails(type, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Service specific error code which serves as the substatus for the HTTP error code. + /// Description of the error. + /// Internal error details. + /// A new instance for mocking. + public static ErrorInformation ErrorInformation(string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new ErrorInformation(code, message, details?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Fully qualified ID of the resource against which the original async operation was started. + /// A new instance for mocking. + public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, string name = null, string status = null, double? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, string resourceId = null) + { + operations ??= new List(); + + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + resourceId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapDatabaseInstanceData SapDatabaseInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapDatabaseProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapDatabaseInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. + /// Defines the SAP Instance status. + /// Defines the provisioning states. + /// Defines the errors related to Database resource. + /// A new instance for mocking. + public static SapDatabaseProperties SapDatabaseProperties(string subnet = null, string databaseSid = null, string databaseType = null, string ipAddress = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapDatabaseProperties( + subnet, + databaseSid, + databaseType, + ipAddress, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual machine id. + /// Defines the SAP Instance status. + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static DatabaseVmDetails DatabaseVmDetails(string virtualMachineId = null, SapVirtualInstanceStatus? status = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new DatabaseVmDetails(virtualMachineId, status, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapCentralServerInstanceData SapCentralServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapCentralServerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapCentralServerInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP message server properties. + /// Defines the SAP Enqueue Server properties. + /// Defines the SAP Gateway Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the errors related to SAP Central Services Instance resource. + /// A new instance for mocking. + public static SapCentralServerProperties SapCentralServerProperties(string instanceNo = null, string subnet = null, MessageServerProperties messageServerProperties = null, EnqueueServerProperties enqueueServerProperties = null, GatewayServerProperties gatewayServerProperties = null, EnqueueReplicationServerProperties enqueueReplicationServerProperties = null, string kernelVersion = null, string kernelPatch = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapCentralServerProperties( + instanceNo, + subnet, + messageServerProperties, + enqueueServerProperties, + gatewayServerProperties, + enqueueReplicationServerProperties, + kernelVersion, + kernelPatch, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + health, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// message server port. + /// message server internal MS port. + /// message server HTTP Port. + /// message server HTTPS Port. + /// message server SAP Hostname. + /// message server IP Address. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static MessageServerProperties MessageServerProperties(long? msPort = null, long? internalMsPort = null, long? httpPort = null, long? httpsPort = null, string hostname = null, string ipAddress = null, SapHealthState? health = null) + { + return new MessageServerProperties( + msPort, + internalMsPort, + httpPort, + httpsPort, + hostname, + ipAddress, + health, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static EnqueueServerProperties EnqueueServerProperties(string hostname = null, string ipAddress = null, long? port = null, SapHealthState? health = null) + { + return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gateway Port. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static GatewayServerProperties GatewayServerProperties(long? port = null, SapHealthState? health = null) + { + return new GatewayServerProperties(port, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of Enqueue Replication Server. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static EnqueueReplicationServerProperties EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion = null, string instanceNo = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, string ipAddress = null, SapHealthState? health = null) + { + return new EnqueueReplicationServerProperties( + ersVersion, + instanceNo, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + health, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of central server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static CentralServerVmDetails CentralServerVmDetails(CentralServerVirtualMachineType? type = null, string virtualMachineId = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new CentralServerVmDetails(type, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static SapVirtualInstanceData SapVirtualInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapVirtualInstanceProperties properties = null, SAPVirtualInstanceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new SapVirtualInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Managed resource group configuration. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the Virtual Instance for SAP state. + /// Defines the provisioning states. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + /// A new instance for mocking. + public static SapVirtualInstanceProperties SapVirtualInstanceProperties(SapEnvironmentType environment = default, SapProductType sapProduct = default, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = null, SapConfiguration configuration = null, string managedResourceGroupName = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceState? state = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + return new SapVirtualInstanceProperties( + environment, + sapProduct, + managedResourcesNetworkAccessType, + configuration, + managedResourceGroupName != null ? new ManagedRGConfiguration(managedResourceGroupName, serializedAdditionalRawData: null) : null, + status, + health, + state, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual machine ID of the Central Server. + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + /// The geo-location where the SAP system exists. + /// A new instance for mocking. + public static DiscoveryConfiguration DiscoveryConfiguration(string centralServerVmId = null, string managedRgStorageAccountName = null, string appLocation = null) + { + return new DiscoveryConfiguration(SapConfigurationType.Discovery, serializedAdditionalRawData: null, centralServerVmId, managedRgStorageAccountName, appLocation); + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// The DB scale method. + /// The high availability type. + /// A new instance for mocking. + public static SapSizingRecommendationContent SapSizingRecommendationContent(string appLocation = null, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, long saps = default, long dbMemory = default, SapDatabaseType databaseType = default, SapDatabaseScaleMethod? dbScaleMethod = null, SapHighAvailabilityType? highAvailabilityType = null) + { + return new SapSizingRecommendationContent( + appLocation, + environment, + sapProduct, + deploymentType, + saps, + dbMemory, + databaseType, + dbScaleMethod, + highAvailabilityType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The recommended VM SKU for single server. + /// A new instance for mocking. + public static SingleServerRecommendationResult SingleServerRecommendationResult(string vmSku = null) + { + return new SingleServerRecommendationResult(SapDeploymentType.SingleServer, serializedAdditionalRawData: null, vmSku); + } + + /// Initializes a new instance of . + /// The database VM SKU. + /// The database server instance count. + /// The central server VM SKU. + /// The central server instance count. + /// The application server VM SKU. + /// The application server instance count. + /// A new instance for mocking. + public static ThreeTierRecommendationResult ThreeTierRecommendationResult(string dbVmSku = null, long? databaseInstanceCount = null, string centralServerVmSku = null, long? centralServerInstanceCount = null, string applicationServerVmSku = null, long? applicationServerInstanceCount = null) + { + return new ThreeTierRecommendationResult( + SapDeploymentType.ThreeTier, + serializedAdditionalRawData: null, + dbVmSku, + databaseInstanceCount, + centralServerVmSku, + centralServerInstanceCount, + applicationServerVmSku, + applicationServerInstanceCount); + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// The high availability type. + /// A new instance for mocking. + public static SapSupportedSkusContent SapSupportedSkusContent(string appLocation = null, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, SapDatabaseType databaseType = default, SapHighAvailabilityType? highAvailabilityType = null) + { + return new SapSupportedSkusContent( + appLocation, + environment, + sapProduct, + deploymentType, + databaseType, + highAvailabilityType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the list of SAP supported SKUs. + /// A new instance for mocking. + public static SapSupportedResourceSkusResult SapSupportedResourceSkusResult(IEnumerable supportedSkus = null) + { + supportedSkus ??= new List(); + + return new SapSupportedResourceSkusResult(supportedSkus?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The VM Sku. + /// True if the Sku is certified for App server in the SAP system. + /// True if the Sku is certified for Database server in the SAP system. + /// A new instance for mocking. + public static SapSupportedSku SapSupportedSku(string vmSku = null, bool? isAppServerCertified = null, bool? isDatabaseCertified = null) + { + return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// A new instance for mocking. + public static SapDiskConfigurationsResult SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations = null) + { + volumeConfigurations ??= new Dictionary(); + + return new SapDiskConfigurationsResult(volumeConfigurations, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + /// A new instance for mocking. + public static SapDiskConfiguration SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration = null, IEnumerable supportedConfigurations = null) + { + supportedConfigurations ??= new List(); + + return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + /// A new instance for mocking. + public static DiskDetails DiskDetails(DiskSkuName? skuName = null, long? sizeGB = null, long? minimumSupportedDiskCount = null, long? maximumSupportedDiskCount = null, long? iopsReadWrite = null, long? mbpsReadWrite = null, string diskTier = null) + { + return new DiskDetails( + skuName != null ? new DiskSku(skuName, serializedAdditionalRawData: null) : null, + sizeGB, + minimumSupportedDiskCount, + maximumSupportedDiskCount, + iopsReadWrite, + mbpsReadWrite, + diskTier, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the list of availability zone pairs. + /// A new instance for mocking. + public static SapAvailabilityZoneDetailsResult SapAvailabilityZoneDetailsResult(IEnumerable availabilityZonePairs = null) + { + availabilityZonePairs ??= new List(); + + return new SapAvailabilityZoneDetailsResult(availabilityZonePairs?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The zone A. + /// The zone B. + /// A new instance for mocking. + public static SapAvailabilityZonePair SapAvailabilityZonePair(long? zoneA = null, long? zoneB = null) + { + return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs new file mode 100644 index 000000000000..aad5abbcbc9e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableSapVirtualInstancesArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesArmClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSapVirtualInstancesArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableSapVirtualInstancesArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapVirtualInstanceResource GetSapVirtualInstanceResource(ResourceIdentifier id) + { + SapVirtualInstanceResource.ValidateResourceId(id); + return new SapVirtualInstanceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapCentralServerInstanceResource GetSapCentralServerInstanceResource(ResourceIdentifier id) + { + SapCentralServerInstanceResource.ValidateResourceId(id); + return new SapCentralServerInstanceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapDatabaseInstanceResource GetSapDatabaseInstanceResource(ResourceIdentifier id) + { + SapDatabaseInstanceResource.ValidateResourceId(id); + return new SapDatabaseInstanceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(ResourceIdentifier id) + { + SapApplicationServerInstanceResource.ValidateResourceId(id); + return new SapApplicationServerInstanceResource(Client, id); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs new file mode 100644 index 000000000000..ca026e2cf97d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableSapVirtualInstancesResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesResourceGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSapVirtualInstancesResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. + /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. + public virtual SapVirtualInstanceCollection GetSapVirtualInstances() + { + return GetCachedClient(client => new SapVirtualInstanceCollection(client, Id)); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapVirtualInstanceAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapVirtualInstances().GetAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapVirtualInstance(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + return GetSapVirtualInstances().Get(sapVirtualInstanceName, cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs new file mode 100644 index 000000000000..e11cf5279920 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableSapVirtualInstancesSubscriptionResource : ArmResource + { + private ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSapVirtualInstancesSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics SapVirtualInstanceClientDiagnostics => _sapVirtualInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); + private SapVirtualInstancesRestOperations SapVirtualInstanceRestClient => _sapVirtualInstanceRestClient ??= new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SapVirtualInstanceResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSapVirtualInstancesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableSapVirtualInstancesSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSapVirtualInstances(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableSapVirtualInstancesSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSizingRecommendationsSapVirtualInstanceAsync(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSizingRecommendationsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetSizingRecommendationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetSizingRecommendationsSapVirtualInstance(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSizingRecommendationsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetSizingRecommendations(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSapSupportedSkuSapVirtualInstanceAsync(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSapSupportedSkuSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetSapSupportedSkuAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetSapSupportedSkuSapVirtualInstance(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSapSupportedSkuSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetSapSupportedSku(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetDiskConfigurationsSapVirtualInstanceAsync(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetDiskConfigurationsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetDiskConfigurationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetDiskConfigurationsSapVirtualInstance(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetDiskConfigurationsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetDiskConfigurations(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetAvailabilityZoneDetailsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetAvailabilityZoneDetailsSapVirtualInstance(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetAvailabilityZoneDetails(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs new file mode 100644 index 000000000000..4ec5c61ddb30 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs @@ -0,0 +1,573 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Mocking; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// A class to add extension methods to Azure.ResourceManager.SapVirtualInstances. + public static partial class SapVirtualInstancesExtensions + { + private static MockableSapVirtualInstancesArmClient GetMockableSapVirtualInstancesArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableSapVirtualInstancesArmClient(client0)); + } + + private static MockableSapVirtualInstancesResourceGroupResource GetMockableSapVirtualInstancesResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSapVirtualInstancesResourceGroupResource(client, resource.Id)); + } + + private static MockableSapVirtualInstancesSubscriptionResource GetMockableSapVirtualInstancesSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSapVirtualInstancesSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapVirtualInstanceResource GetSapVirtualInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapVirtualInstanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapCentralServerInstanceResource GetSapCentralServerInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapCentralServerInstanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapDatabaseInstanceResource GetSapDatabaseInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapDatabaseInstanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapApplicationServerInstanceResource(id); + } + + /// + /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. + public static SapVirtualInstanceCollection GetSapVirtualInstances(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstances(); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSapVirtualInstanceAsync(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstanceAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSapVirtualInstance(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstance(sapVirtualInstanceName, cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSapVirtualInstancesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapVirtualInstancesAsync(cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSapVirtualInstances(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapVirtualInstances(cancellationToken); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSizingRecommendationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetSizingRecommendationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSapSupportedSkuSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetSapSupportedSkuSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetDiskConfigurationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetDiskConfigurationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetAvailabilityZoneDetailsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstance(location, content, cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..058a05ba4c78 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..dd179878f74f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..7579b8ecf8b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5facb4eb97d3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..6e81f2408f30 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..041d71542846 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs new file mode 100644 index 000000000000..3937aa05c15a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class OperationStatusResultOperationSource : IOperationSource + { + OperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs new file mode 100644 index 000000000000..28fa72281674 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapApplicationServerInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapApplicationServerInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapApplicationServerInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return new SapApplicationServerInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return new SapApplicationServerInstanceResource(_client, data); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs new file mode 100644 index 000000000000..f123e9663d38 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapCentralServerInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapCentralServerInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapCentralServerInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return new SapCentralServerInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return new SapCentralServerInstanceResource(_client, data); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs new file mode 100644 index 000000000000..a3d3d6b74de8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapDatabaseInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapDatabaseInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapDatabaseInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return new SapDatabaseInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return new SapDatabaseInstanceResource(_client, data); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs new file mode 100644 index 000000000000..02fa7ad0a4b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapVirtualInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapVirtualInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapVirtualInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return new SapVirtualInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return new SapVirtualInstanceResource(_client, data); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs new file mode 100644 index 000000000000..36f0f8397130 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SapVirtualInstancesArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SapVirtualInstancesArmOperation for mocking. + protected SapVirtualInstancesArmOperation() + { + } + + internal SapVirtualInstancesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SapVirtualInstancesArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SapVirtualInstancesArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs new file mode 100644 index 000000000000..ca203c47d1af --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SapVirtualInstancesArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SapVirtualInstancesArmOperation for mocking. + protected SapVirtualInstancesArmOperation() + { + } + + internal SapVirtualInstancesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SapVirtualInstancesArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "SapVirtualInstancesArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..e41bb2c331cd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerConfiguration(document.RootElement, options); + } + + internal static ApplicationServerConfiguration DeserializeApplicationServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerConfiguration(subnetId, virtualMachineConfiguration, instanceCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeApplicationServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs new file mode 100644 index 000000000000..f21ab55ca189 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the application server configuration. + public partial class ApplicationServerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of app server instances. + /// or is null. + public ApplicationServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of app server instances. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApplicationServerConfiguration() + { + } + + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of app server instances. + public long InstanceCount { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..48dfea2666f5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerFullResourceNames(document.RootElement, options); + } + + internal static ApplicationServerFullResourceNames DeserializeApplicationServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeApplicationServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs new file mode 100644 index 000000000000..2684ded71ef5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public partial class ApplicationServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ApplicationServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerFullResourceNames(IList virtualMachines, string availabilitySetName, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + public string AvailabilitySetName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs new file mode 100644 index 000000000000..67767c76873c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of application server VM. + public readonly partial struct ApplicationServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string StandbyValue = "Standby"; + private const string UnknownValue = "Unknown"; + + /// Active Application server vm type. + public static ApplicationServerVirtualMachineType Active { get; } = new ApplicationServerVirtualMachineType(ActiveValue); + /// Standby Application server vm type. + public static ApplicationServerVirtualMachineType Standby { get; } = new ApplicationServerVirtualMachineType(StandbyValue); + /// Unknown Application server vm type. + public static ApplicationServerVirtualMachineType Unknown { get; } = new ApplicationServerVirtualMachineType(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ApplicationServerVirtualMachineType(string value) => new ApplicationServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationServerVirtualMachineType other && Equals(other); + /// + public bool Equals(ApplicationServerVirtualMachineType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs new file mode 100644 index 000000000000..45b6de179310 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerVmDetails(document.RootElement, options); + } + + internal static ApplicationServerVmDetails DeserializeApplicationServerVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApplicationServerVirtualMachineType? type = default; + string virtualMachineId = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ApplicationServerVirtualMachineType(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerVmDetails(type, virtualMachineId, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeApplicationServerVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs new file mode 100644 index 000000000000..e6ca6f6ac72e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The Application Server VM Details. + public partial class ApplicationServerVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ApplicationServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the type of application server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerVmDetails(ApplicationServerVirtualMachineType? type, string virtualMachineId, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + Type = type; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of application server VM. + public ApplicationServerVirtualMachineType? Type { get; } + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..ae0e4029986d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerConfiguration(document.RootElement, options); + } + + internal static CentralServerConfiguration DeserializeCentralServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerConfiguration(subnetId, virtualMachineConfiguration, instanceCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CentralServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCentralServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs new file mode 100644 index 000000000000..53b7f9ec28b2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the central server configuration. + public partial class CentralServerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of central server VMs. + /// or is null. + public CentralServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of central server VMs. + /// Keeps track of any properties unknown to the library. + internal CentralServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CentralServerConfiguration() + { + } + + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of central server VMs. + public long InstanceCount { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..ed5c1a680adf --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"u8); + writer.WriteObjectValue(LoadBalancer, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerFullResourceNames(document.RootElement, options); + } + + internal static CentralServerFullResourceNames DeserializeCentralServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + LoadBalancerResourceNames loadBalancer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, loadBalancer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + CentralServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCentralServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs new file mode 100644 index 000000000000..dbfcd78a10e8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for central server layer resources. + public partial class CentralServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CentralServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + /// The resource names object for load balancer and related resources. + /// Keeps track of any properties unknown to the library. + internal CentralServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs new file mode 100644 index 000000000000..49877dfa61b0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of central server VM. + public readonly partial struct CentralServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CentralServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + private const string UnknownValue = "Unknown"; + private const string ASCSValue = "ASCS"; + private const string ERSInactiveValue = "ERSInactive"; + private const string ERSValue = "ERS"; + private const string StandbyValue = "Standby"; + + /// Primary central server vm. + public static CentralServerVirtualMachineType Primary { get; } = new CentralServerVirtualMachineType(PrimaryValue); + /// Secondary central server vm. + public static CentralServerVirtualMachineType Secondary { get; } = new CentralServerVirtualMachineType(SecondaryValue); + /// Central server vm type unknown. + public static CentralServerVirtualMachineType Unknown { get; } = new CentralServerVirtualMachineType(UnknownValue); + /// ASCS Central server vm type. + public static CentralServerVirtualMachineType ASCS { get; } = new CentralServerVirtualMachineType(ASCSValue); + /// ERSInactive Central server vm type. + public static CentralServerVirtualMachineType ERSInactive { get; } = new CentralServerVirtualMachineType(ERSInactiveValue); + /// ERS Central server vm type. + public static CentralServerVirtualMachineType ERS { get; } = new CentralServerVirtualMachineType(ERSValue); + /// Standby Central server vm type. + public static CentralServerVirtualMachineType Standby { get; } = new CentralServerVirtualMachineType(StandbyValue); + /// Determines if two values are the same. + public static bool operator ==(CentralServerVirtualMachineType left, CentralServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CentralServerVirtualMachineType left, CentralServerVirtualMachineType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CentralServerVirtualMachineType(string value) => new CentralServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CentralServerVirtualMachineType other && Equals(other); + /// + public bool Equals(CentralServerVirtualMachineType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs new file mode 100644 index 000000000000..5a5ece362f2f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerVmDetails(document.RootElement, options); + } + + internal static CentralServerVmDetails DeserializeCentralServerVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CentralServerVirtualMachineType? type = default; + string virtualMachineId = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new CentralServerVirtualMachineType(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerVmDetails(type, virtualMachineId, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support writing '{options.Format}' format."); + } + } + + CentralServerVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCentralServerVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs new file mode 100644 index 000000000000..626e32d3317b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Central Services Instance VM details. + public partial class CentralServerVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CentralServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the type of central server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal CentralServerVmDetails(CentralServerVirtualMachineType? type, string virtualMachineId, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + Type = type; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of central server VM. + public CentralServerVirtualMachineType? Type { get; } + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..21eb3e603547 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CreateAndMountFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + if (Optional.IsDefined(StorageAccountName)) + { + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + } + } + + CreateAndMountFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateAndMountFileShareConfiguration(document.RootElement, options); + } + + internal static CreateAndMountFileShareConfiguration DeserializeCreateAndMountFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceGroup = default; + string storageAccountName = default; + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateAndMountFileShareConfiguration(configurationType, serializedAdditionalRawData, resourceGroup, storageAccountName); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CreateAndMountFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateAndMountFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs new file mode 100644 index 000000000000..fc2dbbd2fecb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration where the transport directory fileshare is created and mounted as a part of the create infra flow. Please pre-create the resource group you intend to place the transport directory in. The storage account and fileshare will be auto-created by the ACSS and doesn't need to be pre-created. + public partial class CreateAndMountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + public CreateAndMountFileShareConfiguration() + { + ConfigurationType = FileShareConfigurationType.CreateAndMount; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + /// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. + /// The name of file share storage account name . A custom name is used in case of missing input. + internal CreateAndMountFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData, string resourceGroup, string storageAccountName) : base(configurationType, serializedAdditionalRawData) + { + ResourceGroup = resourceGroup; + StorageAccountName = storageAccountName; + ConfigurationType = configurationType; + } + + /// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. + public string ResourceGroup { get; set; } + /// The name of file share storage account name . A custom name is used in case of missing input. + public string StorageAccountName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs new file mode 100644 index 000000000000..3fd349895ade --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.Value.ToString()); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (Optional.IsDefined(DiskConfiguration)) + { + writer.WritePropertyName("diskConfiguration"u8); + writer.WriteObjectValue(DiskConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseConfiguration(document.RootElement, options); + } + + internal static DatabaseConfiguration DeserializeDatabaseConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDatabaseType? databaseType = default; + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + DiskConfiguration diskConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseConfiguration( + databaseType, + subnetId, + virtualMachineConfiguration, + instanceCount, + diskConfiguration, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DatabaseConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDatabaseConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs new file mode 100644 index 000000000000..69aee508d675 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the database configuration. + public partial class DatabaseConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of database VMs. + /// or is null. + public DatabaseConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The database type. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of database VMs. + /// Gets or sets the disk configuration. + /// Keeps track of any properties unknown to the library. + internal DatabaseConfiguration(SapDatabaseType? databaseType, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, DiskConfiguration diskConfiguration, IDictionary serializedAdditionalRawData) + { + DatabaseType = databaseType; + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + DiskConfiguration = diskConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DatabaseConfiguration() + { + } + + /// The database type. + public SapDatabaseType? DatabaseType { get; set; } + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of database VMs. + public long InstanceCount { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DiskConfiguration is null) + DiskConfiguration = new DiskConfiguration(); + return DiskConfiguration.DiskVolumeConfigurations; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..e6f3e2c1a6e5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"u8); + writer.WriteObjectValue(LoadBalancer, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseServerFullResourceNames(document.RootElement, options); + } + + internal static DatabaseServerFullResourceNames DeserializeDatabaseServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + LoadBalancerResourceNames loadBalancer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, loadBalancer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + DatabaseServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDatabaseServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs new file mode 100644 index 000000000000..b2b72f89a779 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public partial class DatabaseServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatabaseServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + /// The resource names object for load balancer and related resources. + /// Keeps track of any properties unknown to the library. + internal DatabaseServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs new file mode 100644 index 000000000000..7038446499e2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseVmDetails(document.RootElement, options); + } + + internal static DatabaseVmDetails DeserializeDatabaseVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string virtualMachineId = default; + SapVirtualInstanceStatus? status = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseVmDetails(virtualMachineId, status, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support writing '{options.Format}' format."); + } + } + + DatabaseVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDatabaseVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs new file mode 100644 index 000000000000..374863a609ff --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Database VM details. + public partial class DatabaseVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatabaseVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The virtual machine id. + /// Defines the SAP Instance status. + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal DatabaseVmDetails(string virtualMachineId, SapVirtualInstanceStatus? status, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + VirtualMachineId = virtualMachineId; + Status = status; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs new file mode 100644 index 000000000000..c0bfb4cd7fd2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeployerVmPackages : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeployerVmPackages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployerVmPackages(document.RootElement, options); + } + + internal static DeployerVmPackages DeserializeDeployerVmPackages(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + string storageAccountId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeployerVmPackages(url, storageAccountId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support writing '{options.Format}' format."); + } + } + + DeployerVmPackages IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeployerVmPackages(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs new file mode 100644 index 000000000000..37d42b92156b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the url and storage account ID where deployer VM packages are uploaded. + public partial class DeployerVmPackages + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeployerVmPackages() + { + } + + /// Initializes a new instance of . + /// The URL to the deployer VM packages file. + /// The deployer VM packages storage account id. + /// Keeps track of any properties unknown to the library. + internal DeployerVmPackages(string uri, string storageAccountId, IDictionary serializedAdditionalRawData) + { + Uri = uri; + StorageAccountId = storageAccountId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The URL to the deployer VM packages file. + public string Uri { get; set; } + /// The deployer VM packages storage account id. + public string StorageAccountId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs new file mode 100644 index 000000000000..2b74d7ab6290 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeploymentConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + if (Optional.IsDefined(InfrastructureConfiguration)) + { + writer.WritePropertyName("infrastructureConfiguration"u8); + writer.WriteObjectValue(InfrastructureConfiguration, options); + } + if (Optional.IsDefined(SoftwareConfiguration)) + { + writer.WritePropertyName("softwareConfiguration"u8); + writer.WriteObjectValue(SoftwareConfiguration, options); + } + } + + DeploymentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentConfiguration(document.RootElement, options); + } + + internal static DeploymentConfiguration DeserializeDeploymentConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + InfrastructureConfiguration infrastructureConfiguration = default; + SoftwareConfiguration softwareConfiguration = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("infrastructureConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureConfiguration = InfrastructureConfiguration.DeserializeInfrastructureConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareConfiguration = SoftwareConfiguration.DeserializeSoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentConfiguration(configurationType, serializedAdditionalRawData, appLocation, infrastructureConfiguration, softwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DeploymentConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs new file mode 100644 index 000000000000..0721863185e0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Deployment Configuration. + public partial class DeploymentConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DeploymentConfiguration() + { + ConfigurationType = SapConfigurationType.Deployment; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The geo-location where the SAP system is to be created. + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal DeploymentConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration) : base(configurationType, serializedAdditionalRawData) + { + AppLocation = appLocation; + InfrastructureConfiguration = infrastructureConfiguration; + SoftwareConfiguration = softwareConfiguration; + ConfigurationType = configurationType; + } + + /// The geo-location where the SAP system is to be created. + public string AppLocation { get; set; } + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public InfrastructureConfiguration InfrastructureConfiguration { get; set; } + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SoftwareConfiguration SoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs new file mode 100644 index 000000000000..dccb2765bd67 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeploymentWithOSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + if (Optional.IsDefined(InfrastructureConfiguration)) + { + writer.WritePropertyName("infrastructureConfiguration"u8); + writer.WriteObjectValue(InfrastructureConfiguration, options); + } + if (Optional.IsDefined(SoftwareConfiguration)) + { + writer.WritePropertyName("softwareConfiguration"u8); + writer.WriteObjectValue(SoftwareConfiguration, options); + } + if (Optional.IsDefined(OSSapConfiguration)) + { + writer.WritePropertyName("osSapConfiguration"u8); + writer.WriteObjectValue(OSSapConfiguration, options); + } + } + + DeploymentWithOSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentWithOSConfiguration(document.RootElement, options); + } + + internal static DeploymentWithOSConfiguration DeserializeDeploymentWithOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + InfrastructureConfiguration infrastructureConfiguration = default; + SoftwareConfiguration softwareConfiguration = default; + OSSapConfiguration osSapConfiguration = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("infrastructureConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureConfiguration = InfrastructureConfiguration.DeserializeInfrastructureConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareConfiguration = SoftwareConfiguration.DeserializeSoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("osSapConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osSapConfiguration = OSSapConfiguration.DeserializeOSSapConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentWithOSConfiguration( + configurationType, + serializedAdditionalRawData, + appLocation, + infrastructureConfiguration, + softwareConfiguration, + osSapConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DeploymentWithOSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentWithOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs new file mode 100644 index 000000000000..224d0e3f3b25 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Deployment along with OS Configuration. + public partial class DeploymentWithOSConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DeploymentWithOSConfiguration() + { + ConfigurationType = SapConfigurationType.DeploymentWithOSConfig; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The geo-location where the SAP system is to be created. + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// The OS and SAP configuration. + internal DeploymentWithOSConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration, OSSapConfiguration osSapConfiguration) : base(configurationType, serializedAdditionalRawData) + { + AppLocation = appLocation; + InfrastructureConfiguration = infrastructureConfiguration; + SoftwareConfiguration = softwareConfiguration; + OSSapConfiguration = osSapConfiguration; + ConfigurationType = configurationType; + } + + /// The geo-location where the SAP system is to be created. + public string AppLocation { get; set; } + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public InfrastructureConfiguration InfrastructureConfiguration { get; set; } + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SoftwareConfiguration SoftwareConfiguration { get; set; } + /// The OS and SAP configuration. + public OSSapConfiguration OSSapConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs new file mode 100644 index 000000000000..bb6e8cc752fe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiscoveryConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"u8); + writer.WriteStringValue(CentralServerVmId); + } + if (Optional.IsDefined(ManagedRgStorageAccountName)) + { + writer.WritePropertyName("managedRgStorageAccountName"u8); + writer.WriteStringValue(ManagedRgStorageAccountName); + } + if (options.Format != "W" && Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + } + + DiscoveryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoveryConfiguration(document.RootElement, options); + } + + internal static DiscoveryConfiguration DeserializeDiscoveryConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string centralServerVmId = default; + string managedRgStorageAccountName = default; + string appLocation = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId"u8)) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("managedRgStorageAccountName"u8)) + { + managedRgStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoveryConfiguration(configurationType, serializedAdditionalRawData, centralServerVmId, managedRgStorageAccountName, appLocation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiscoveryConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiscoveryConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs new file mode 100644 index 000000000000..84ebbd127936 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Discovery Details. + public partial class DiscoveryConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DiscoveryConfiguration() + { + ConfigurationType = SapConfigurationType.Discovery; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The virtual machine ID of the Central Server. + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + /// The geo-location where the SAP system exists. + internal DiscoveryConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string centralServerVmId, string managedRgStorageAccountName, string appLocation) : base(configurationType, serializedAdditionalRawData) + { + CentralServerVmId = centralServerVmId; + ManagedRgStorageAccountName = managedRgStorageAccountName; + AppLocation = appLocation; + ConfigurationType = configurationType; + } + + /// The virtual machine ID of the Central Server. + public string CentralServerVmId { get; set; } + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + public string ManagedRgStorageAccountName { get; set; } + /// The geo-location where the SAP system exists. + public string AppLocation { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs new file mode 100644 index 000000000000..c7288d092ad4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class DiskConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(DiskVolumeConfigurations)) + { + writer.WritePropertyName("diskVolumeConfigurations"u8); + writer.WriteStartObject(); + foreach (var item in DiskVolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskConfiguration(document.RootElement, options); + } + + internal static DiskConfiguration DeserializeDiskConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary diskVolumeConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskVolumeConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property0.Value, options)); + } + diskVolumeConfigurations = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskConfiguration(diskVolumeConfigurations ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiskConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs new file mode 100644 index 000000000000..acbc18a0e4fc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The Disk Configuration Details. + internal partial class DiskConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskConfiguration() + { + DiskVolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// Keeps track of any properties unknown to the library. + internal DiskConfiguration(IDictionary diskVolumeConfigurations, IDictionary serializedAdditionalRawData) + { + DiskVolumeConfigurations = diskVolumeConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs new file mode 100644 index 000000000000..85e7bca85acf --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiskDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"u8); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(MinimumSupportedDiskCount)) + { + writer.WritePropertyName("minimumSupportedDiskCount"u8); + writer.WriteNumberValue(MinimumSupportedDiskCount.Value); + } + if (Optional.IsDefined(MaximumSupportedDiskCount)) + { + writer.WritePropertyName("maximumSupportedDiskCount"u8); + writer.WriteNumberValue(MaximumSupportedDiskCount.Value); + } + if (Optional.IsDefined(IopsReadWrite)) + { + writer.WritePropertyName("iopsReadWrite"u8); + writer.WriteNumberValue(IopsReadWrite.Value); + } + if (Optional.IsDefined(MbpsReadWrite)) + { + writer.WritePropertyName("mbpsReadWrite"u8); + writer.WriteNumberValue(MbpsReadWrite.Value); + } + if (Optional.IsDefined(DiskTier)) + { + writer.WritePropertyName("diskTier"u8); + writer.WriteStringValue(DiskTier); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskDetails(document.RootElement, options); + } + + internal static DiskDetails DeserializeDiskDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskSku sku = default; + long? sizeGB = default; + long? minimumSupportedDiskCount = default; + long? maximumSupportedDiskCount = default; + long? iopsReadWrite = default; + long? mbpsReadWrite = default; + string diskTier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value, options); + continue; + } + if (property.NameEquals("sizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("minimumSupportedDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("maximumSupportedDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("iopsReadWrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iopsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("mbpsReadWrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mbpsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskTier"u8)) + { + diskTier = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskDetails( + sku, + sizeGB, + minimumSupportedDiskCount, + maximumSupportedDiskCount, + iopsReadWrite, + mbpsReadWrite, + diskTier, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskDetails)} does not support writing '{options.Format}' format."); + } + } + + DiskDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiskDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs new file mode 100644 index 000000000000..287917b944e9 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The supported disk size details for a disk type. + public partial class DiskDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DiskDetails() + { + } + + /// Initializes a new instance of . + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + /// Keeps track of any properties unknown to the library. + internal DiskDetails(DiskSku sku, long? sizeGB, long? minimumSupportedDiskCount, long? maximumSupportedDiskCount, long? iopsReadWrite, long? mbpsReadWrite, string diskTier, IDictionary serializedAdditionalRawData) + { + Sku = sku; + SizeGB = sizeGB; + MinimumSupportedDiskCount = minimumSupportedDiskCount; + MaximumSupportedDiskCount = maximumSupportedDiskCount; + IopsReadWrite = iopsReadWrite; + MbpsReadWrite = mbpsReadWrite; + DiskTier = diskTier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + internal DiskSku Sku { get; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku?.Name; + } + + /// The disk size in GB. + public long? SizeGB { get; } + /// The minimum supported disk count. + public long? MinimumSupportedDiskCount { get; } + /// The maximum supported disk count. + public long? MaximumSupportedDiskCount { get; } + /// The disk Iops. + public long? IopsReadWrite { get; } + /// The disk provisioned throughput in MBps. + public long? MbpsReadWrite { get; } + /// The disk tier, e.g. P10, E10. + public string DiskTier { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs new file mode 100644 index 000000000000..605a8db25228 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class DiskSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskSku(document.RootElement, options); + } + + internal static DiskSku DeserializeDiskSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskSkuName? name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new DiskSkuName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskSku(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{options.Format}' format."); + } + } + + DiskSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiskSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs new file mode 100644 index 000000000000..60a805bbce3b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + internal partial class DiskSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskSku() + { + } + + /// Initializes a new instance of . + /// Defines the disk sku name. + /// Keeps track of any properties unknown to the library. + internal DiskSku(DiskSkuName? name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the disk sku name. + public DiskSkuName? Name { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs new file mode 100644 index 000000000000..63def1a37360 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the disk sku name. + public readonly partial struct DiskSkuName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskSkuName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardLRSValue = "Standard_LRS"; + private const string PremiumLRSValue = "Premium_LRS"; + private const string StandardSSDLRSValue = "StandardSSD_LRS"; + private const string UltraSSDLRSValue = "UltraSSD_LRS"; + private const string PremiumZRSValue = "Premium_ZRS"; + private const string StandardSSDZRSValue = "StandardSSD_ZRS"; + private const string PremiumV2LRSValue = "PremiumV2_LRS"; + + /// Standard LRS Disk SKU. + public static DiskSkuName StandardLRS { get; } = new DiskSkuName(StandardLRSValue); + /// Premium_LRS Disk SKU. + public static DiskSkuName PremiumLRS { get; } = new DiskSkuName(PremiumLRSValue); + /// StandardSSD_LRS Disk SKU. + public static DiskSkuName StandardSSDLRS { get; } = new DiskSkuName(StandardSSDLRSValue); + /// UltraSSD_LRS Disk SKU. + public static DiskSkuName UltraSSDLRS { get; } = new DiskSkuName(UltraSSDLRSValue); + /// Premium_ZRS Disk SKU. + public static DiskSkuName PremiumZRS { get; } = new DiskSkuName(PremiumZRSValue); + /// StandardSSD_ZRS Disk SKU. + public static DiskSkuName StandardSSDZRS { get; } = new DiskSkuName(StandardSSDZRSValue); + /// PremiumV2_LRS Disk SKU. + public static DiskSkuName PremiumV2LRS { get; } = new DiskSkuName(PremiumV2LRSValue); + /// Determines if two values are the same. + public static bool operator ==(DiskSkuName left, DiskSkuName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskSkuName left, DiskSkuName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DiskSkuName(string value) => new DiskSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskSkuName other && Equals(other); + /// + public bool Equals(DiskSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs new file mode 100644 index 000000000000..a94f422c03da --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiskVolumeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"u8); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskVolumeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskVolumeConfiguration(document.RootElement, options); + } + + internal static DiskVolumeConfiguration DeserializeDiskVolumeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? count = default; + long? sizeGB = default; + DiskSku sku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskVolumeConfiguration(count, sizeGB, sku, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskVolumeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiskVolumeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs new file mode 100644 index 000000000000..2c23bc66fa35 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The disk configuration required for the selected volume. + public partial class DiskVolumeConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskVolumeConfiguration() + { + } + + /// Initializes a new instance of . + /// The total number of disks required for the concerned volume. + /// The disk size in GB. + /// The disk SKU details. + /// Keeps track of any properties unknown to the library. + internal DiskVolumeConfiguration(long? count, long? sizeGB, DiskSku sku, IDictionary serializedAdditionalRawData) + { + Count = count; + SizeGB = sizeGB; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The total number of disks required for the concerned volume. + public long? Count { get; set; } + /// The disk size in GB. + public long? SizeGB { get; set; } + /// The disk SKU details. + internal DiskSku Sku { get; set; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new DiskSku(); + Sku.Name = value; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs new file mode 100644 index 000000000000..326a0ff0cf18 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class EnqueueReplicationServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ErsVersion)) + { + writer.WritePropertyName("ersVersion"u8); + writer.WriteStringValue(ErsVersion.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnqueueReplicationServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnqueueReplicationServerProperties(document.RootElement, options); + } + + internal static EnqueueReplicationServerProperties DeserializeEnqueueReplicationServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EnqueueReplicationServerType? ersVersion = default; + string instanceNo = default; + string hostname = default; + string kernelVersion = default; + string kernelPatch = default; + string ipAddress = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ersVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ersVersion = new EnqueueReplicationServerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnqueueReplicationServerProperties( + ersVersion, + instanceNo, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + health, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support writing '{options.Format}' format."); + } + } + + EnqueueReplicationServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEnqueueReplicationServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs new file mode 100644 index 000000000000..2a2556a09feb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Enqueue Replication Server (ERS) properties. + public partial class EnqueueReplicationServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EnqueueReplicationServerProperties() + { + } + + /// Initializes a new instance of . + /// Defines the type of Enqueue Replication Server. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion, string instanceNo, string hostname, string kernelVersion, string kernelPatch, string ipAddress, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + ErsVersion = ersVersion; + InstanceNo = instanceNo; + Hostname = hostname; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + IPAddress = ipAddress; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of Enqueue Replication Server. + public EnqueueReplicationServerType? ErsVersion { get; } + /// ERS Instance Number. + public string InstanceNo { get; } + /// ERS SAP Hostname. + public string Hostname { get; } + /// ERS SAP Kernel Version. + public string KernelVersion { get; } + /// ERS SAP Kernel Patch level. + public string KernelPatch { get; } + /// ERS SAP IP Address. + public string IPAddress { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs new file mode 100644 index 000000000000..7ca6390ea71e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of Enqueue Replication Server. + public readonly partial struct EnqueueReplicationServerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnqueueReplicationServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnqueueReplicator1Value = "EnqueueReplicator1"; + private const string EnqueueReplicator2Value = "EnqueueReplicator2"; + + /// Enqueue Replication server type 1. + public static EnqueueReplicationServerType EnqueueReplicator1 { get; } = new EnqueueReplicationServerType(EnqueueReplicator1Value); + /// Enqueue Replication server type 2. + public static EnqueueReplicationServerType EnqueueReplicator2 { get; } = new EnqueueReplicationServerType(EnqueueReplicator2Value); + /// Determines if two values are the same. + public static bool operator ==(EnqueueReplicationServerType left, EnqueueReplicationServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnqueueReplicationServerType left, EnqueueReplicationServerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EnqueueReplicationServerType(string value) => new EnqueueReplicationServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnqueueReplicationServerType other && Equals(other); + /// + public bool Equals(EnqueueReplicationServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs new file mode 100644 index 000000000000..af47b7bc300e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class EnqueueServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnqueueServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnqueueServerProperties(document.RootElement, options); + } + + internal static EnqueueServerProperties DeserializeEnqueueServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hostname = default; + string ipAddress = default; + long? port = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support writing '{options.Format}' format."); + } + } + + EnqueueServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEnqueueServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs new file mode 100644 index 000000000000..b93b8f3fa2fc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Enqueue Server properties. + public partial class EnqueueServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EnqueueServerProperties() + { + } + + /// Initializes a new instance of . + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal EnqueueServerProperties(string hostname, string ipAddress, long? port, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + Hostname = hostname; + IPAddress = ipAddress; + Port = port; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enqueue Server SAP Hostname. + public string Hostname { get; } + /// Enqueue Server SAP IP Address. + public string IPAddress { get; } + /// Enqueue Server Port. + public long? Port { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs new file mode 100644 index 000000000000..b69c53650402 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ErrorInformation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorInformation)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ErrorInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorInformation(document.RootElement, options); + } + + internal static ErrorInformation DeserializeErrorInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IReadOnlyList details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeErrorInformation(item, options)); + } + details = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorInformation(code, message, details ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ErrorInformation)} does not support writing '{options.Format}' format."); + } + } + + ErrorInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeErrorInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs new file mode 100644 index 000000000000..bd6490030f9c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Error definition. + public partial class ErrorInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ErrorInformation() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Service specific error code which serves as the substatus for the HTTP error code. + /// Description of the error. + /// Internal error details. + /// Keeps track of any properties unknown to the library. + internal ErrorInformation(string code, string message, IReadOnlyList details, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Service specific error code which serves as the substatus for the HTTP error code. + public string Code { get; } + /// Description of the error. + public string Message { get; } + /// Internal error details. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..66b3a24a35b6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ExternalInstallationSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"u8); + writer.WriteStringValue(CentralServerVmId); + } + } + + ExternalInstallationSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExternalInstallationSoftwareConfiguration(document.RootElement, options); + } + + internal static ExternalInstallationSoftwareConfiguration DeserializeExternalInstallationSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string centralServerVmId = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId"u8)) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExternalInstallationSoftwareConfiguration(softwareInstallationType, serializedAdditionalRawData, centralServerVmId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ExternalInstallationSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExternalInstallationSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs new file mode 100644 index 000000000000..c3b397f6d40e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is installed externally outside the service. + public partial class ExternalInstallationSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + public ExternalInstallationSoftwareConfiguration() + { + SoftwareInstallationType = SapSoftwareInstallationType.External; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The resource ID of the virtual machine containing the central server instance. + internal ExternalInstallationSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string centralServerVmId) : base(softwareInstallationType, serializedAdditionalRawData) + { + CentralServerVmId = centralServerVmId; + SoftwareInstallationType = softwareInstallationType; + } + + /// The resource ID of the virtual machine containing the central server instance. + public string CentralServerVmId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..51660a6f3b2e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownFileShareConfiguration))] + public partial class FileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + + internal static FileShareConfiguration DeserializeFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CreateAndMount": return CreateAndMountFileShareConfiguration.DeserializeCreateAndMountFileShareConfiguration(element, options); + case "Mount": return MountFileShareConfiguration.DeserializeMountFileShareConfiguration(element, options); + case "Skip": return SkipFileShareConfiguration.DeserializeSkipFileShareConfiguration(element, options); + } + } + return UnknownFileShareConfiguration.DeserializeUnknownFileShareConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs new file mode 100644 index 000000000000..72ea38306a60 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// File Share configuration details, populated with information on storage configuration mounted on the VIS. The createAndMount option is selected in case of missing input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class FileShareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected FileShareConfiguration() + { + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal FileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + internal FileShareConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs new file mode 100644 index 000000000000..8230c74a73e0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of file share config. + internal readonly partial struct FileShareConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FileShareConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SkipValue = "Skip"; + private const string CreateAndMountValue = "CreateAndMount"; + private const string MountValue = "Mount"; + + /// Skip creating the file share. + public static FileShareConfigurationType Skip { get; } = new FileShareConfigurationType(SkipValue); + /// Fileshare will be created and mounted by service. + public static FileShareConfigurationType CreateAndMount { get; } = new FileShareConfigurationType(CreateAndMountValue); + /// Existing fileshare provided will be mounted by service. + public static FileShareConfigurationType Mount { get; } = new FileShareConfigurationType(MountValue); + /// Determines if two values are the same. + public static bool operator ==(FileShareConfigurationType left, FileShareConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FileShareConfigurationType left, FileShareConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FileShareConfigurationType(string value) => new FileShareConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FileShareConfigurationType other && Equals(other); + /// + public bool Equals(FileShareConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs new file mode 100644 index 000000000000..f5bcb907ce26 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class GatewayServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GatewayServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewayServerProperties(document.RootElement, options); + } + + internal static GatewayServerProperties DeserializeGatewayServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? port = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewayServerProperties(port, health, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support writing '{options.Format}' format."); + } + } + + GatewayServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeGatewayServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs new file mode 100644 index 000000000000..0127fde8ef92 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Gateway Server properties. + public partial class GatewayServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public GatewayServerProperties() + { + } + + /// Initializes a new instance of . + /// Gateway Port. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal GatewayServerProperties(long? port, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + Port = port; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gateway Port. + public long? Port { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs new file mode 100644 index 000000000000..df19e48cbb52 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class HighAvailabilityConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HighAvailabilityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHighAvailabilityConfiguration(document.RootElement, options); + } + + internal static HighAvailabilityConfiguration DeserializeHighAvailabilityConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapHighAvailabilityType highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("highAvailabilityType"u8)) + { + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HighAvailabilityConfiguration(highAvailabilityType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support writing '{options.Format}' format."); + } + } + + HighAvailabilityConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHighAvailabilityConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs new file mode 100644 index 000000000000..a7d32d1ab84e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the high availability configuration. + internal partial class HighAvailabilityConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The high availability type. + public HighAvailabilityConfiguration(SapHighAvailabilityType highAvailabilityType) + { + HighAvailabilityType = highAvailabilityType; + } + + /// Initializes a new instance of . + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal HighAvailabilityConfiguration(SapHighAvailabilityType highAvailabilityType, IDictionary serializedAdditionalRawData) + { + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HighAvailabilityConfiguration() + { + } + + /// The high availability type. + public SapHighAvailabilityType HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..9a8f6785ba9b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class HighAvailabilitySoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("fencingClientId"u8); + writer.WriteStringValue(FencingClientId); + writer.WritePropertyName("fencingClientPassword"u8); + writer.WriteStringValue(FencingClientPassword); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HighAvailabilitySoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHighAvailabilitySoftwareConfiguration(document.RootElement, options); + } + + internal static HighAvailabilitySoftwareConfiguration DeserializeHighAvailabilitySoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fencingClientId = default; + string fencingClientPassword = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fencingClientId"u8)) + { + fencingClientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fencingClientPassword"u8)) + { + fencingClientPassword = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HighAvailabilitySoftwareConfiguration(fencingClientId, fencingClientPassword, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + HighAvailabilitySoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHighAvailabilitySoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs new file mode 100644 index 000000000000..14c9a64c0718 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the HA software configuration. + public partial class HighAvailabilitySoftwareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The fencing client id. + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + /// or is null. + public HighAvailabilitySoftwareConfiguration(string fencingClientId, string fencingClientPassword) + { + Argument.AssertNotNull(fencingClientId, nameof(fencingClientId)); + Argument.AssertNotNull(fencingClientPassword, nameof(fencingClientPassword)); + + FencingClientId = fencingClientId; + FencingClientPassword = fencingClientPassword; + } + + /// Initializes a new instance of . + /// The fencing client id. + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + /// Keeps track of any properties unknown to the library. + internal HighAvailabilitySoftwareConfiguration(string fencingClientId, string fencingClientPassword, IDictionary serializedAdditionalRawData) + { + FencingClientId = fencingClientId; + FencingClientPassword = fencingClientPassword; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HighAvailabilitySoftwareConfiguration() + { + } + + /// The fencing client id. + public string FencingClientId { get; set; } + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + public string FencingClientPassword { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs new file mode 100644 index 000000000000..a2e2db5c02c5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ImageReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(Offer)) + { + writer.WritePropertyName("offer"u8); + writer.WriteStringValue(Offer); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteStringValue(Sku); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageReference(document.RootElement, options); + } + + internal static ImageReference DeserializeImageReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisher = default; + string offer = default; + string sku = default; + string version = default; + ResourceIdentifier id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("offer"u8)) + { + offer = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageReference( + publisher, + offer, + sku, + version, + id, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{options.Format}' format."); + } + } + + ImageReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImageReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs new file mode 100644 index 000000000000..a55799521852 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. + public partial class ImageReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ImageReference() + { + } + + /// Initializes a new instance of . + /// The image publisher. + /// Specifies the offer of the platform image or marketplace image used to create the virtual machine. + /// The image SKU. + /// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + /// Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. + /// Keeps track of any properties unknown to the library. + internal ImageReference(string publisher, string offer, string sku, string version, ResourceIdentifier id, IDictionary serializedAdditionalRawData) + { + Publisher = publisher; + Offer = offer; + Sku = sku; + Version = version; + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The image publisher. + public string Publisher { get; set; } + /// Specifies the offer of the platform image or marketplace image used to create the virtual machine. + public string Offer { get; set; } + /// The image SKU. + public string Sku { get; set; } + /// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + public string Version { get; set; } + /// Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. + public ResourceIdentifier Id { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs new file mode 100644 index 000000000000..7e8dbe89b985 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownInfrastructureConfiguration))] + public partial class InfrastructureConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appResourceGroup"u8); + writer.WriteStringValue(AppResourceGroup); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InfrastructureConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + + internal static InfrastructureConfiguration DeserializeInfrastructureConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SingleServer": return SingleServerConfiguration.DeserializeSingleServerConfiguration(element, options); + case "ThreeTier": return ThreeTierConfiguration.DeserializeThreeTierConfiguration(element, options); + } + } + return UnknownInfrastructureConfiguration.DeserializeUnknownInfrastructureConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{options.Format}' format."); + } + } + + InfrastructureConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs new file mode 100644 index 000000000000..5b41b47e9932 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// Deploy SAP Infrastructure Details. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class InfrastructureConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// is null. + protected InfrastructureConfiguration(string appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + + AppResourceGroup = appResourceGroup; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal InfrastructureConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) + { + AppResourceGroup = appResourceGroup; + DeploymentType = deploymentType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InfrastructureConfiguration() + { + } + + /// The application resource group where SAP system resources will be deployed. + public string AppResourceGroup { get; set; } + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + internal SapDeploymentType DeploymentType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs new file mode 100644 index 000000000000..9e280c1c8d6f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class LinuxConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(DisablePasswordAuthentication)) + { + writer.WritePropertyName("disablePasswordAuthentication"u8); + writer.WriteBooleanValue(DisablePasswordAuthentication.Value); + } + if (Optional.IsDefined(Ssh)) + { + writer.WritePropertyName("ssh"u8); + writer.WriteObjectValue(Ssh, options); + } + if (Optional.IsDefined(SshKeyPair)) + { + writer.WritePropertyName("sshKeyPair"u8); + writer.WriteObjectValue(SshKeyPair, options); + } + } + + LinuxConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLinuxConfiguration(document.RootElement, options); + } + + internal static LinuxConfiguration DeserializeLinuxConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? disablePasswordAuthentication = default; + SshConfiguration ssh = default; + SshKeyPair sshKeyPair = default; + OSType osType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disablePasswordAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disablePasswordAuthentication = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("ssh"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ssh = SshConfiguration.DeserializeSshConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("sshKeyPair"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sshKeyPair = SshKeyPair.DeserializeSshKeyPair(property.Value, options); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LinuxConfiguration(osType, serializedAdditionalRawData, disablePasswordAuthentication, ssh, sshKeyPair); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{options.Format}' format."); + } + } + + LinuxConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLinuxConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs new file mode 100644 index 000000000000..cbab30ff0f28 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + public partial class LinuxConfiguration : OSConfiguration + { + /// Initializes a new instance of . + public LinuxConfiguration() + { + OSType = OSType.Linux; + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + /// Specifies whether password authentication should be disabled. + /// Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead). + /// The SSH Key-pair used to authenticate with the VM's. + internal LinuxConfiguration(OSType osType, IDictionary serializedAdditionalRawData, bool? disablePasswordAuthentication, SshConfiguration ssh, SshKeyPair sshKeyPair) : base(osType, serializedAdditionalRawData) + { + DisablePasswordAuthentication = disablePasswordAuthentication; + Ssh = ssh; + SshKeyPair = sshKeyPair; + OSType = osType; + } + + /// Specifies whether password authentication should be disabled. + public bool? DisablePasswordAuthentication { get; set; } + /// Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead). + internal SshConfiguration Ssh { get; set; } + /// The list of SSH public keys used to authenticate with linux based VMs. + public IList SshPublicKeys + { + get + { + if (Ssh is null) + Ssh = new SshConfiguration(); + return Ssh.PublicKeys; + } + } + + /// The SSH Key-pair used to authenticate with the VM's. + public SshKeyPair SshKeyPair { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs new file mode 100644 index 000000000000..901f359bd4bd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class LoadBalancerResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(LoadBalancerName)) + { + writer.WritePropertyName("loadBalancerName"u8); + writer.WriteStringValue(LoadBalancerName); + } + if (Optional.IsCollectionDefined(FrontendIPConfigurationNames)) + { + writer.WritePropertyName("frontendIpConfigurationNames"u8); + writer.WriteStartArray(); + foreach (var item in FrontendIPConfigurationNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BackendPoolNames)) + { + writer.WritePropertyName("backendPoolNames"u8); + writer.WriteStartArray(); + foreach (var item in BackendPoolNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(HealthProbeNames)) + { + writer.WritePropertyName("healthProbeNames"u8); + writer.WriteStartArray(); + foreach (var item in HealthProbeNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoadBalancerResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadBalancerResourceNames(document.RootElement, options); + } + + internal static LoadBalancerResourceNames DeserializeLoadBalancerResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string loadBalancerName = default; + IList frontendIPConfigurationNames = default; + IList backendPoolNames = default; + IList healthProbeNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loadBalancerName"u8)) + { + loadBalancerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("frontendIpConfigurationNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + frontendIPConfigurationNames = array; + continue; + } + if (property.NameEquals("backendPoolNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + backendPoolNames = array; + continue; + } + if (property.NameEquals("healthProbeNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + healthProbeNames = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadBalancerResourceNames(loadBalancerName, frontendIPConfigurationNames ?? new ChangeTrackingList(), backendPoolNames ?? new ChangeTrackingList(), healthProbeNames ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support writing '{options.Format}' format."); + } + } + + LoadBalancerResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLoadBalancerResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs new file mode 100644 index 000000000000..e3bf1c626759 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for load balancer and related resources. + public partial class LoadBalancerResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LoadBalancerResourceNames() + { + FrontendIPConfigurationNames = new ChangeTrackingList(); + BackendPoolNames = new ChangeTrackingList(); + HealthProbeNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// Keeps track of any properties unknown to the library. + internal LoadBalancerResourceNames(string loadBalancerName, IList frontendIPConfigurationNames, IList backendPoolNames, IList healthProbeNames, IDictionary serializedAdditionalRawData) + { + LoadBalancerName = loadBalancerName; + FrontendIPConfigurationNames = frontendIPConfigurationNames; + BackendPoolNames = backendPoolNames; + HealthProbeNames = healthProbeNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + public string LoadBalancerName { get; set; } + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList FrontendIPConfigurationNames { get; } + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + public IList BackendPoolNames { get; } + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList HealthProbeNames { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs new file mode 100644 index 000000000000..671fbda680d1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class ManagedRGConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedRGConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedRGConfiguration(document.RootElement, options); + } + + internal static ManagedRGConfiguration DeserializeManagedRGConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedRGConfiguration(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ManagedRGConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeManagedRGConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs new file mode 100644 index 000000000000..97925c7a1239 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Managed resource group configuration. + internal partial class ManagedRGConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ManagedRGConfiguration() + { + } + + /// Initializes a new instance of . + /// Managed resource group name. + /// Keeps track of any properties unknown to the library. + internal ManagedRGConfiguration(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Managed resource group name. + public string Name { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs new file mode 100644 index 000000000000..77453b9854c6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the network access type for managed resources. + public readonly partial struct ManagedResourcesNetworkAccessType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedResourcesNetworkAccessType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicValue = "Public"; + private const string PrivateValue = "Private"; + + /// Managed resources will be deployed with public network access enabled. + public static ManagedResourcesNetworkAccessType Public { get; } = new ManagedResourcesNetworkAccessType(PublicValue); + /// Managed resources will be deployed with public network access disabled. + public static ManagedResourcesNetworkAccessType Private { get; } = new ManagedResourcesNetworkAccessType(PrivateValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedResourcesNetworkAccessType left, ManagedResourcesNetworkAccessType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedResourcesNetworkAccessType left, ManagedResourcesNetworkAccessType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedResourcesNetworkAccessType(string value) => new ManagedResourcesNetworkAccessType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedResourcesNetworkAccessType other && Equals(other); + /// + public bool Equals(ManagedResourcesNetworkAccessType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs new file mode 100644 index 000000000000..0434ab79a18d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class MessageServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MsPort)) + { + writer.WritePropertyName("msPort"u8); + writer.WriteNumberValue(MsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(InternalMsPort)) + { + writer.WritePropertyName("internalMsPort"u8); + writer.WriteNumberValue(InternalMsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(HttpPort)) + { + writer.WritePropertyName("httpPort"u8); + writer.WriteNumberValue(HttpPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(HttpsPort)) + { + writer.WritePropertyName("httpsPort"u8); + writer.WriteNumberValue(HttpsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MessageServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageServerProperties(document.RootElement, options); + } + + internal static MessageServerProperties DeserializeMessageServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? msPort = default; + long? internalMsPort = default; + long? httpPort = default; + long? httpsPort = default; + string hostname = default; + string ipAddress = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("msPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + msPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("internalMsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + internalMsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("httpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("httpsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageServerProperties( + msPort, + internalMsPort, + httpPort, + httpsPort, + hostname, + ipAddress, + health, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support writing '{options.Format}' format."); + } + } + + MessageServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMessageServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs new file mode 100644 index 000000000000..d1c6765d55c6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP message server properties. + public partial class MessageServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MessageServerProperties() + { + } + + /// Initializes a new instance of . + /// message server port. + /// message server internal MS port. + /// message server HTTP Port. + /// message server HTTPS Port. + /// message server SAP Hostname. + /// message server IP Address. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal MessageServerProperties(long? msPort, long? internalMsPort, long? httpPort, long? httpsPort, string hostname, string ipAddress, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + MsPort = msPort; + InternalMsPort = internalMsPort; + HttpPort = httpPort; + HttpsPort = httpsPort; + Hostname = hostname; + IPAddress = ipAddress; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// message server port. + public long? MsPort { get; } + /// message server internal MS port. + public long? InternalMsPort { get; } + /// message server HTTP Port. + public long? HttpPort { get; } + /// message server HTTPS Port. + public long? HttpsPort { get; } + /// message server SAP Hostname. + public string Hostname { get; } + /// message server IP Address. + public string IPAddress { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..37f3772f7d6b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class MountFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("privateEndpointId"u8); + writer.WriteStringValue(PrivateEndpointId); + } + + MountFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMountFileShareConfiguration(document.RootElement, options); + } + + internal static MountFileShareConfiguration DeserializeMountFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string privateEndpointId = default; + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointId"u8)) + { + privateEndpointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MountFileShareConfiguration(configurationType, serializedAdditionalRawData, id, privateEndpointId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + MountFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMountFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs new file mode 100644 index 000000000000..97b436cc473b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration where the transport directory fileshare already exists, and user wishes to mount the fileshare as a part of the create infra flow. + public partial class MountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + /// The fileshare resource ID. + /// The private endpoint resource ID. + /// or is null. + public MountFileShareConfiguration(string id, string privateEndpointId) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(privateEndpointId, nameof(privateEndpointId)); + + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = FileShareConfigurationType.Mount; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + /// The fileshare resource ID. + /// The private endpoint resource ID. + internal MountFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData, string id, string privateEndpointId) : base(configurationType, serializedAdditionalRawData) + { + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal MountFileShareConfiguration() + { + } + + /// The fileshare resource ID. + public string Id { get; set; } + /// The private endpoint resource ID. + public string PrivateEndpointId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs new file mode 100644 index 000000000000..f80495efa1ed --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The pattern type to be used for resource naming. + internal readonly partial struct NamingPatternType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NamingPatternType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullResourceNameValue = "FullResourceName"; + + /// Full resource names that will be created by service. + public static NamingPatternType FullResourceName { get; } = new NamingPatternType(FullResourceNameValue); + /// Determines if two values are the same. + public static bool operator ==(NamingPatternType left, NamingPatternType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NamingPatternType left, NamingPatternType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NamingPatternType(string value) => new NamingPatternType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NamingPatternType other && Equals(other); + /// + public bool Equals(NamingPatternType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs new file mode 100644 index 000000000000..c6f2d0737bfd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class NetworkConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsSecondaryIPEnabled)) + { + writer.WritePropertyName("isSecondaryIpEnabled"u8); + writer.WriteBooleanValue(IsSecondaryIPEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + + internal static NetworkConfiguration DeserializeNetworkConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isSecondaryIPEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isSecondaryIpEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSecondaryIPEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkConfiguration(isSecondaryIPEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{options.Format}' format."); + } + } + + NetworkConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs new file mode 100644 index 000000000000..ef284cd37b59 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the network configuration type for SAP system infrastructure that is being deployed. + internal partial class NetworkConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkConfiguration() + { + } + + /// Initializes a new instance of . + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + /// Keeps track of any properties unknown to the library. + internal NetworkConfiguration(bool? isSecondaryIPEnabled, IDictionary serializedAdditionalRawData) + { + IsSecondaryIPEnabled = isSecondaryIPEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs new file mode 100644 index 000000000000..105826063e86 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class NetworkInterfaceResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NetworkInterfaceName)) + { + writer.WritePropertyName("networkInterfaceName"u8); + writer.WriteStringValue(NetworkInterfaceName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkInterfaceResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkInterfaceResourceNames(document.RootElement, options); + } + + internal static NetworkInterfaceResourceNames DeserializeNetworkInterfaceResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string networkInterfaceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkInterfaceName"u8)) + { + networkInterfaceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkInterfaceResourceNames(networkInterfaceName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support writing '{options.Format}' format."); + } + } + + NetworkInterfaceResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkInterfaceResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs new file mode 100644 index 000000000000..44b73d795b66 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for network interface and related resources. + public partial class NetworkInterfaceResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkInterfaceResourceNames() + { + } + + /// Initializes a new instance of . + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + /// Keeps track of any properties unknown to the library. + internal NetworkInterfaceResourceNames(string networkInterfaceName, IDictionary serializedAdditionalRawData) + { + NetworkInterfaceName = networkInterfaceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + public string NetworkInterfaceName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs new file mode 100644 index 000000000000..35b8f94a8edb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownOSConfiguration))] + public partial class OSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSConfiguration(document.RootElement, options); + } + + internal static OSConfiguration DeserializeOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("osType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Linux": return LinuxConfiguration.DeserializeLinuxConfiguration(element, options); + case "Windows": return WindowsConfiguration.DeserializeWindowsConfiguration(element, options); + } + } + return UnknownOSConfiguration.DeserializeUnknownOSConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs new file mode 100644 index 000000000000..f5348cf70e97 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// Defines the OS configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class OSConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected OSConfiguration() + { + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal OSConfiguration(OSType osType, IDictionary serializedAdditionalRawData) + { + OSType = osType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The OS Type. + internal OSType OSType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs new file mode 100644 index 000000000000..2b0a50a790df --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OSProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdminUsername)) + { + writer.WritePropertyName("adminUsername"u8); + writer.WriteStringValue(AdminUsername); + } + if (Optional.IsDefined(AdminPassword)) + { + writer.WritePropertyName("adminPassword"u8); + writer.WriteStringValue(AdminPassword); + } + if (Optional.IsDefined(OSConfiguration)) + { + writer.WritePropertyName("osConfiguration"u8); + writer.WriteObjectValue(OSConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSProfile(document.RootElement, options); + } + + internal static OSProfile DeserializeOSProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string adminUsername = default; + string adminPassword = default; + OSConfiguration osConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminUsername"u8)) + { + adminUsername = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("osConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osConfiguration = OSConfiguration.DeserializeOSConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSProfile(adminUsername, adminPassword, osConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSProfile)} does not support writing '{options.Format}' format."); + } + } + + OSProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOSProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs new file mode 100644 index 000000000000..b90bef9c789e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. + public partial class OSProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSProfile() + { + } + + /// Initializes a new instance of . + /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + /// + /// Specifies Windows operating system settings on the virtual machine. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal OSProfile(string adminUsername, string adminPassword, OSConfiguration osConfiguration, IDictionary serializedAdditionalRawData) + { + AdminUsername = adminUsername; + AdminPassword = adminPassword; + OSConfiguration = osConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + public string AdminUsername { get; set; } + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + public string AdminPassword { get; set; } + /// + /// Specifies Windows operating system settings on the virtual machine. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public OSConfiguration OSConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs new file mode 100644 index 000000000000..c01bc57963b7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OSSapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DeployerVmPackages)) + { + writer.WritePropertyName("deployerVmPackages"u8); + writer.WriteObjectValue(DeployerVmPackages, options); + } + if (Optional.IsDefined(SapFqdn)) + { + writer.WritePropertyName("sapFqdn"u8); + writer.WriteStringValue(SapFqdn); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSSapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSSapConfiguration(document.RootElement, options); + } + + internal static OSSapConfiguration DeserializeOSSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeployerVmPackages deployerVmPackages = default; + string sapFqdn = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deployerVmPackages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deployerVmPackages = DeployerVmPackages.DeserializeDeployerVmPackages(property.Value, options); + continue; + } + if (property.NameEquals("sapFqdn"u8)) + { + sapFqdn = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSSapConfiguration(deployerVmPackages, sapFqdn, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSSapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOSSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs new file mode 100644 index 000000000000..c1435f2ce3f4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the OS and SAP Configurations for Deployment. + public partial class OSSapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSSapConfiguration() + { + } + + /// Initializes a new instance of . + /// The url and storage account ID where deployer VM packages are uploaded. + /// The FQDN to set for the SAP system. + /// Keeps track of any properties unknown to the library. + internal OSSapConfiguration(DeployerVmPackages deployerVmPackages, string sapFqdn, IDictionary serializedAdditionalRawData) + { + DeployerVmPackages = deployerVmPackages; + SapFqdn = sapFqdn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The url and storage account ID where deployer VM packages are uploaded. + public DeployerVmPackages DeployerVmPackages { get; set; } + /// The FQDN to set for the SAP system. + public string SapFqdn { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs new file mode 100644 index 000000000000..c7ee614b79b8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The OS Type. + internal readonly partial struct OSType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// Linux OS Type. + public static OSType Linux { get; } = new OSType(LinuxValue); + /// Windows OS Type. + public static OSType Windows { get; } = new OSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OSType left, OSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OSType left, OSType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OSType(string value) => new OSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OSType other && Equals(other); + /// + public bool Equals(OSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs new file mode 100644 index 000000000000..98e830268a0f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OperationStatusResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(PercentComplete)) + { + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete.Value); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsCollectionDefined(Operations)) + { + writer.WritePropertyName("operations"u8); + writer.WriteStartArray(); + foreach (var item in Operations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationStatusResult(document.RootElement, options); + } + + internal static OperationStatusResult DeserializeOperationStatusResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + string status = default; + double? percentComplete = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + IReadOnlyList operations = default; + ResponseError error = default; + string resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("operations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeOperationStatusResult(item, options)); + } + operations = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startTime, + endTime, + operations ?? new ChangeTrackingList(), + error, + resourceId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{options.Format}' format."); + } + } + + OperationStatusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOperationStatusResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs new file mode 100644 index 000000000000..37b47a98223c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The current status of an async operation. + public partial class OperationStatusResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Operation status. + /// is null. + internal OperationStatusResult(string status) + { + Argument.AssertNotNull(status, nameof(status)); + + Status = status; + Operations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Keeps track of any properties unknown to the library. + internal OperationStatusResult(ResourceIdentifier id, string name, string status, double? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, string resourceId, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + Status = status; + PercentComplete = percentComplete; + StartOn = startOn; + EndOn = endOn; + Operations = operations; + Error = error; + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationStatusResult() + { + } + + /// Fully qualified ID for the async operation. + public ResourceIdentifier Id { get; } + /// Name of the async operation. + public string Name { get; } + /// Operation status. + public string Status { get; } + /// Percent of the operation that is complete. + public double? PercentComplete { get; } + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// The operations list. + public IReadOnlyList Operations { get; } + /// If present, details of the operation error. + public ResponseError Error { get; } + /// Fully qualified ID of the resource against which the original async operation was started. + public string ResourceId { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..22a662a426b7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPApplicationServerInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPApplicationServerInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPApplicationServerInstanceListResult(document.RootElement, options); + } + + internal static SAPApplicationServerInstanceListResult DeserializeSAPApplicationServerInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPApplicationServerInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPApplicationServerInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSAPApplicationServerInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs new file mode 100644 index 000000000000..489d532757e6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPApplicationServerInstance list operation. + internal partial class SAPApplicationServerInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPApplicationServerInstance items on this page. + /// is null. + internal SAPApplicationServerInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPApplicationServerInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPApplicationServerInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPApplicationServerInstanceListResult() + { + } + + /// The SAPApplicationServerInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..9f732b1b82f8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPCentralServerInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPCentralServerInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPCentralServerInstanceListResult(document.RootElement, options); + } + + internal static SAPCentralServerInstanceListResult DeserializeSAPCentralServerInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPCentralServerInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPCentralServerInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSAPCentralServerInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs new file mode 100644 index 000000000000..e96dcd7dc003 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPCentralServerInstance list operation. + internal partial class SAPCentralServerInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPCentralServerInstance items on this page. + /// is null. + internal SAPCentralServerInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPCentralServerInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPCentralServerInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPCentralServerInstanceListResult() + { + } + + /// The SAPCentralServerInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..e8c3ab2c54a4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPDatabaseInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPDatabaseInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPDatabaseInstanceListResult(document.RootElement, options); + } + + internal static SAPDatabaseInstanceListResult DeserializeSAPDatabaseInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPDatabaseInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPDatabaseInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSAPDatabaseInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs new file mode 100644 index 000000000000..e1105767d0dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPDatabaseInstance list operation. + internal partial class SAPDatabaseInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPDatabaseInstance items on this page. + /// is null. + internal SAPDatabaseInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPDatabaseInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPDatabaseInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPDatabaseInstanceListResult() + { + } + + /// The SAPDatabaseInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs new file mode 100644 index 000000000000..9de6cb670062 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SAPVirtualInstanceIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + JsonSerializer.Serialize(writer, item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPVirtualInstanceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPVirtualInstanceIdentity(document.RootElement, options); + } + + internal static SAPVirtualInstanceIdentity DeserializeSAPVirtualInstanceIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SAPVirtualInstanceIdentityType type = default; + IDictionary userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new SAPVirtualInstanceIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); + } + userAssignedIdentities = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPVirtualInstanceIdentity(type, userAssignedIdentities ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support writing '{options.Format}' format."); + } + } + + SAPVirtualInstanceIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSAPVirtualInstanceIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs new file mode 100644 index 000000000000..8067eca50865 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Managed service identity (user assigned identities). + public partial class SAPVirtualInstanceIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + public SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType type) + { + Type = type; + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// Keeps track of any properties unknown to the library. + internal SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType type, IDictionary userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + Type = type; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPVirtualInstanceIdentity() + { + } + + /// The type of managed identity assigned to this resource. + public SAPVirtualInstanceIdentityType Type { get; set; } + /// The identities assigned to this resource by the user. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs new file mode 100644 index 000000000000..8d542c8db648 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Type of managed service identity (where only None and UserAssigned types are allowed). + public readonly partial struct SAPVirtualInstanceIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SAPVirtualInstanceIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserAssignedValue = "UserAssigned"; + + /// No managed identity. + public static SAPVirtualInstanceIdentityType None { get; } = new SAPVirtualInstanceIdentityType(NoneValue); + /// User assigned managed identity. + public static SAPVirtualInstanceIdentityType UserAssigned { get; } = new SAPVirtualInstanceIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(SAPVirtualInstanceIdentityType left, SAPVirtualInstanceIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SAPVirtualInstanceIdentityType left, SAPVirtualInstanceIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SAPVirtualInstanceIdentityType(string value) => new SAPVirtualInstanceIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SAPVirtualInstanceIdentityType other && Equals(other); + /// + public bool Equals(SAPVirtualInstanceIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..9c446629ca95 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPVirtualInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPVirtualInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPVirtualInstanceListResult(document.RootElement, options); + } + + internal static SAPVirtualInstanceListResult DeserializeSAPVirtualInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapVirtualInstanceData.DeserializeSapVirtualInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPVirtualInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPVirtualInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSAPVirtualInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs new file mode 100644 index 000000000000..5b521df7e308 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPVirtualInstance list operation. + internal partial class SAPVirtualInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPVirtualInstance items on this page. + /// is null. + internal SAPVirtualInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPVirtualInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPVirtualInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPVirtualInstanceListResult() + { + } + + /// The SAPVirtualInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs new file mode 100644 index 000000000000..9c0677dca39d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapApplicationServerInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapApplicationServerInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerInstancePatch(document.RootElement, options); + } + + internal static SapApplicationServerInstancePatch DeserializeSapApplicationServerInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapApplicationServerInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs new file mode 100644 index 000000000000..15de09ef1995 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Application Instance. + public partial class SapApplicationServerInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapApplicationServerInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs new file mode 100644 index 000000000000..ffcb4c291695 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapApplicationServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(GatewayPort)) + { + writer.WritePropertyName("gatewayPort"u8); + writer.WriteNumberValue(GatewayPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(IcmHttpPort)) + { + writer.WritePropertyName("icmHttpPort"u8); + writer.WriteNumberValue(IcmHttpPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(IcmHttpsPort)) + { + writer.WritePropertyName("icmHttpsPort"u8); + writer.WriteNumberValue(IcmHttpsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(DispatcherStatus)) + { + writer.WritePropertyName("dispatcherStatus"u8); + writer.WriteStringValue(DispatcherStatus); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapApplicationServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerProperties(document.RootElement, options); + } + + internal static SapApplicationServerProperties DeserializeSapApplicationServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceNo = default; + string subnet = default; + string hostname = default; + string kernelVersion = default; + string kernelPatch = default; + string ipAddress = default; + long? gatewayPort = default; + long? icmHttpPort = default; + long? icmHttpsPort = default; + string dispatcherStatus = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("gatewayPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("icmHttpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + icmHttpPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("icmHttpsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + icmHttpsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("dispatcherStatus"u8)) + { + dispatcherStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationServerVmDetails.DeserializeApplicationServerVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerProperties( + instanceNo, + subnet, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + gatewayPort, + icmHttpPort, + icmHttpsPort, + dispatcherStatus, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + health, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapApplicationServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs new file mode 100644 index 000000000000..d3d6af0f324d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Application Server instance properties. + public partial class SapApplicationServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapApplicationServerProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// Application server instance dispatcher status. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the Application Instance errors. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerProperties(string instanceNo, string subnet, string hostname, string kernelVersion, string kernelPatch, string ipAddress, long? gatewayPort, long? icmHttpPort, long? icmHttpsPort, string dispatcherStatus, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + InstanceNo = instanceNo; + Subnet = subnet; + Hostname = hostname; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + IPAddress = ipAddress; + GatewayPort = gatewayPort; + IcmHttpPort = icmHttpPort; + IcmHttpsPort = icmHttpsPort; + DispatcherStatus = dispatcherStatus; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + Health = health; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Application server Instance Number. + public string InstanceNo { get; } + /// Application server Subnet. + public string Subnet { get; } + /// Application server instance SAP hostname. + public string Hostname { get; } + /// Application server instance SAP Kernel Version. + public string KernelVersion { get; } + /// Application server instance SAP Kernel Patch level. + public string KernelPatch { get; } + /// Application server instance SAP IP Address. + public string IPAddress { get; } + /// Application server instance gateway Port. + public long? GatewayPort { get; } + /// Application server instance ICM HTTP Port. + public long? IcmHttpPort { get; } + /// Application server instance ICM HTTPS Port. + public long? IcmHttpsPort { get; } + /// Application server instance dispatcher status. + public string DispatcherStatus { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the Application Instance errors. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs new file mode 100644 index 000000000000..8e7729759a88 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZoneDetailsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZoneDetailsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZoneDetailsContent(document.RootElement, options); + } + + internal static SapAvailabilityZoneDetailsContent DeserializeSapAvailabilityZoneDetailsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapProductType sapProduct = default; + SapDatabaseType databaseType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZoneDetailsContent(appLocation, sapProduct, databaseType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZoneDetailsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapAvailabilityZoneDetailsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs new file mode 100644 index 000000000000..1e7a1d088400 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of availability zones. + public partial class SapAvailabilityZoneDetailsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// is null. + public SapAvailabilityZoneDetailsContent(string appLocation, SapProductType sapProduct, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + SapProduct = sapProduct; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZoneDetailsContent(string appLocation, SapProductType sapProduct, SapDatabaseType databaseType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + SapProduct = sapProduct; + DatabaseType = databaseType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapAvailabilityZoneDetailsContent() + { + } + + /// The geo-location where the SAP resources will be created. + public string AppLocation { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs new file mode 100644 index 000000000000..f881f34c7485 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZoneDetailsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AvailabilityZonePairs)) + { + writer.WritePropertyName("availabilityZonePairs"u8); + writer.WriteStartArray(); + foreach (var item in AvailabilityZonePairs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZoneDetailsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZoneDetailsResult(document.RootElement, options); + } + + internal static SapAvailabilityZoneDetailsResult DeserializeSapAvailabilityZoneDetailsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList availabilityZonePairs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availabilityZonePairs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapAvailabilityZonePair.DeserializeSapAvailabilityZonePair(item, options)); + } + availabilityZonePairs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZoneDetailsResult(availabilityZonePairs ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZoneDetailsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapAvailabilityZoneDetailsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs new file mode 100644 index 000000000000..d0f35ceb0bb2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of supported availability zone pairs which are part of SAP HA deployment. + public partial class SapAvailabilityZoneDetailsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapAvailabilityZoneDetailsResult() + { + AvailabilityZonePairs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the list of availability zone pairs. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZoneDetailsResult(IReadOnlyList availabilityZonePairs, IDictionary serializedAdditionalRawData) + { + AvailabilityZonePairs = availabilityZonePairs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the list of availability zone pairs. + public IReadOnlyList AvailabilityZonePairs { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs new file mode 100644 index 000000000000..c38cbf30d325 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZonePair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ZoneA)) + { + writer.WritePropertyName("zoneA"u8); + writer.WriteNumberValue(ZoneA.Value); + } + if (Optional.IsDefined(ZoneB)) + { + writer.WritePropertyName("zoneB"u8); + writer.WriteNumberValue(ZoneB.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZonePair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZonePair(document.RootElement, options); + } + + internal static SapAvailabilityZonePair DeserializeSapAvailabilityZonePair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? zoneA = default; + long? zoneB = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zoneA"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneA = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("zoneB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneB = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZonePair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapAvailabilityZonePair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs new file mode 100644 index 000000000000..81233b446ae0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Availability Zone Pair. + public partial class SapAvailabilityZonePair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapAvailabilityZonePair() + { + } + + /// Initializes a new instance of . + /// The zone A. + /// The zone B. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZonePair(long? zoneA, long? zoneB, IDictionary serializedAdditionalRawData) + { + ZoneA = zoneA; + ZoneB = zoneB; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The zone A. + public long? ZoneA { get; } + /// The zone B. + public long? ZoneB { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs new file mode 100644 index 000000000000..241a2d1f6d27 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapCentralServerInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapCentralServerInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerInstancePatch(document.RootElement, options); + } + + internal static SapCentralServerInstancePatch DeserializeSapCentralServerInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapCentralServerInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs new file mode 100644 index 000000000000..9b4349b1b46b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Central Instance. + public partial class SapCentralServerInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapCentralServerInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs new file mode 100644 index 000000000000..dd06b3a4f44f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapCentralServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (Optional.IsDefined(MessageServerProperties)) + { + writer.WritePropertyName("messageServerProperties"u8); + writer.WriteObjectValue(MessageServerProperties, options); + } + if (Optional.IsDefined(EnqueueServerProperties)) + { + writer.WritePropertyName("enqueueServerProperties"u8); + writer.WriteObjectValue(EnqueueServerProperties, options); + } + if (Optional.IsDefined(GatewayServerProperties)) + { + writer.WritePropertyName("gatewayServerProperties"u8); + writer.WriteObjectValue(GatewayServerProperties, options); + } + if (Optional.IsDefined(EnqueueReplicationServerProperties)) + { + writer.WritePropertyName("enqueueReplicationServerProperties"u8); + writer.WriteObjectValue(EnqueueReplicationServerProperties, options); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapCentralServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerProperties(document.RootElement, options); + } + + internal static SapCentralServerProperties DeserializeSapCentralServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceNo = default; + string subnet = default; + MessageServerProperties messageServerProperties = default; + EnqueueServerProperties enqueueServerProperties = default; + GatewayServerProperties gatewayServerProperties = default; + EnqueueReplicationServerProperties enqueueReplicationServerProperties = default; + string kernelVersion = default; + string kernelPatch = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("messageServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + messageServerProperties = MessageServerProperties.DeserializeMessageServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("enqueueServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enqueueServerProperties = EnqueueServerProperties.DeserializeEnqueueServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("gatewayServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServerProperties = GatewayServerProperties.DeserializeGatewayServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("enqueueReplicationServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enqueueReplicationServerProperties = EnqueueReplicationServerProperties.DeserializeEnqueueReplicationServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CentralServerVmDetails.DeserializeCentralServerVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerProperties( + instanceNo, + subnet, + messageServerProperties, + enqueueServerProperties, + gatewayServerProperties, + enqueueReplicationServerProperties, + kernelVersion, + kernelPatch, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + health, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapCentralServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs new file mode 100644 index 000000000000..2c46c90b32bd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Central Services Instance properties. + public partial class SapCentralServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapCentralServerProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP message server properties. + /// Defines the SAP Enqueue Server properties. + /// Defines the SAP Gateway Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the errors related to SAP Central Services Instance resource. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerProperties(string instanceNo, string subnet, MessageServerProperties messageServerProperties, EnqueueServerProperties enqueueServerProperties, GatewayServerProperties gatewayServerProperties, EnqueueReplicationServerProperties enqueueReplicationServerProperties, string kernelVersion, string kernelPatch, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + InstanceNo = instanceNo; + Subnet = subnet; + MessageServerProperties = messageServerProperties; + EnqueueServerProperties = enqueueServerProperties; + GatewayServerProperties = gatewayServerProperties; + EnqueueReplicationServerProperties = enqueueReplicationServerProperties; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + Health = health; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The central services instance number. + public string InstanceNo { get; } + /// The central services instance subnet. + public string Subnet { get; } + /// Defines the SAP message server properties. + public MessageServerProperties MessageServerProperties { get; set; } + /// Defines the SAP Enqueue Server properties. + public EnqueueServerProperties EnqueueServerProperties { get; set; } + /// Defines the SAP Gateway Server properties. + public GatewayServerProperties GatewayServerProperties { get; set; } + /// Defines the SAP Enqueue Replication Server (ERS) properties. + public EnqueueReplicationServerProperties EnqueueReplicationServerProperties { get; set; } + /// The central services instance Kernel Version. + public string KernelVersion { get; } + /// The central services instance Kernel Patch level. + public string KernelPatch { get; } + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Central Services instance. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the errors related to SAP Central Services Instance resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs new file mode 100644 index 000000000000..e6ccff69d1d9 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSapConfiguration))] + public partial class SapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapConfiguration(document.RootElement, options); + } + + internal static SapConfiguration DeserializeSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Deployment": return DeploymentConfiguration.DeserializeDeploymentConfiguration(element, options); + case "DeploymentWithOSConfig": return DeploymentWithOSConfiguration.DeserializeDeploymentWithOSConfiguration(element, options); + case "Discovery": return DiscoveryConfiguration.DeserializeDiscoveryConfiguration(element, options); + } + } + return UnknownSapConfiguration.DeserializeUnknownSapConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs new file mode 100644 index 000000000000..1c62e1446f1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP Configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class SapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SapConfiguration() + { + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + internal SapConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The configuration type. Eg: Deployment/Discovery. + internal SapConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs new file mode 100644 index 000000000000..967f3a80c04e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The configuration Type. + internal readonly partial struct SapConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeploymentValue = "Deployment"; + private const string DiscoveryValue = "Discovery"; + private const string DeploymentWithOSConfigValue = "DeploymentWithOSConfig"; + + /// SAP system will be deployed by service. No OS configurations will be done. + public static SapConfigurationType Deployment { get; } = new SapConfigurationType(DeploymentValue); + /// Existing SAP system will be registered. + public static SapConfigurationType Discovery { get; } = new SapConfigurationType(DiscoveryValue); + /// SAP system will be deployed by service. OS configurations will be done. + public static SapConfigurationType DeploymentWithOSConfig { get; } = new SapConfigurationType(DeploymentWithOSConfigValue); + /// Determines if two values are the same. + public static bool operator ==(SapConfigurationType left, SapConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapConfigurationType left, SapConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapConfigurationType(string value) => new SapConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapConfigurationType other && Equals(other); + /// + public bool Equals(SapConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs new file mode 100644 index 000000000000..8e80922c3f37 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDatabaseInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDatabaseInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseInstancePatch(document.RootElement, options); + } + + internal static SapDatabaseInstancePatch DeserializeSapDatabaseInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapDatabaseInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs new file mode 100644 index 000000000000..69919b2cb4dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Database Instance. + public partial class SapDatabaseInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapDatabaseInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..77513b2c1765 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseSid)) + { + writer.WritePropertyName("databaseSid"u8); + writer.WriteStringValue(DatabaseSid); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseProperties(document.RootElement, options); + } + + internal static SapDatabaseProperties DeserializeSapDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnet = default; + string databaseSid = default; + string databaseType = default; + string ipAddress = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseSid"u8)) + { + databaseSid = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatabaseVmDetails.DeserializeDatabaseVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseProperties( + subnet, + databaseSid, + databaseType, + ipAddress, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs new file mode 100644 index 000000000000..e5c3d9feaeae --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Database properties. + public partial class SapDatabaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapDatabaseProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. + /// Defines the SAP Instance status. + /// Defines the provisioning states. + /// Defines the errors related to Database resource. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseProperties(string subnet, string databaseSid, string databaseType, string ipAddress, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + Subnet = subnet; + DatabaseSid = databaseSid; + DatabaseType = databaseType; + IPAddress = ipAddress; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Database subnet. + public string Subnet { get; } + /// Database SID name. + public string DatabaseSid { get; } + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + public string DatabaseType { get; } + /// Database IP Address. + public string IPAddress { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Database resource. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the errors related to Database resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs new file mode 100644 index 000000000000..32f8ad626a75 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The database scale method. + public readonly partial struct SapDatabaseScaleMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDatabaseScaleMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScaleUpValue = "ScaleUp"; + + /// ScaleUp Hana Database deployment type. + public static SapDatabaseScaleMethod ScaleUp { get; } = new SapDatabaseScaleMethod(ScaleUpValue); + /// Determines if two values are the same. + public static bool operator ==(SapDatabaseScaleMethod left, SapDatabaseScaleMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDatabaseScaleMethod left, SapDatabaseScaleMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDatabaseScaleMethod(string value) => new SapDatabaseScaleMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDatabaseScaleMethod other && Equals(other); + /// + public bool Equals(SapDatabaseScaleMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs new file mode 100644 index 000000000000..d258a1c8ed0a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the supported SAP Database types. + public readonly partial struct SapDatabaseType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDatabaseType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HANAValue = "HANA"; + private const string DB2Value = "DB2"; + + /// HANA Database type of SAP system. + public static SapDatabaseType HANA { get; } = new SapDatabaseType(HANAValue); + /// DB2 database type of the SAP system. + public static SapDatabaseType DB2 { get; } = new SapDatabaseType(DB2Value); + /// Determines if two values are the same. + public static bool operator ==(SapDatabaseType left, SapDatabaseType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDatabaseType left, SapDatabaseType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDatabaseType(string value) => new SapDatabaseType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDatabaseType other && Equals(other); + /// + public bool Equals(SapDatabaseType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs new file mode 100644 index 000000000000..26f7a80b134f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of SAP deployment, single server or Three tier. + public readonly partial struct SapDeploymentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDeploymentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleServerValue = "SingleServer"; + private const string ThreeTierValue = "ThreeTier"; + + /// SAP Single server deployment type. + public static SapDeploymentType SingleServer { get; } = new SapDeploymentType(SingleServerValue); + /// SAP Distributed deployment type. + public static SapDeploymentType ThreeTier { get; } = new SapDeploymentType(ThreeTierValue); + /// Determines if two values are the same. + public static bool operator ==(SapDeploymentType left, SapDeploymentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDeploymentType left, SapDeploymentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDeploymentType(string value) => new SapDeploymentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDeploymentType other && Equals(other); + /// + public bool Equals(SapDeploymentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs new file mode 100644 index 000000000000..95694f291fd2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RecommendedConfiguration)) + { + writer.WritePropertyName("recommendedConfiguration"u8); + writer.WriteObjectValue(RecommendedConfiguration, options); + } + if (Optional.IsCollectionDefined(SupportedConfigurations)) + { + writer.WritePropertyName("supportedConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in SupportedConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfiguration(document.RootElement, options); + } + + internal static SapDiskConfiguration DeserializeSapDiskConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskVolumeConfiguration recommendedConfiguration = default; + IReadOnlyList supportedConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recommendedConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recommendedConfiguration = DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("supportedConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiskDetails.DeserializeDiskDetails(item, options)); + } + supportedConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapDiskConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs new file mode 100644 index 000000000000..4518983516d1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type. + public partial class SapDiskConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapDiskConfiguration() + { + SupportedConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration, IReadOnlyList supportedConfigurations, IDictionary serializedAdditionalRawData) + { + RecommendedConfiguration = recommendedConfiguration; + SupportedConfigurations = supportedConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The recommended disk details for a given VM Sku. + public DiskVolumeConfiguration RecommendedConfiguration { get; } + /// The list of supported disks for a given VM Sku. + public IReadOnlyList SupportedConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs new file mode 100644 index 000000000000..49b5e3dba56d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfigurationsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("dbVmSku"u8); + writer.WriteStringValue(DbVmSku); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfigurationsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfigurationsContent(document.RootElement, options); + } + + internal static SapDiskConfigurationsContent DeserializeSapDiskConfigurationsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDatabaseType databaseType = default; + SapDeploymentType deploymentType = default; + string dbVmSku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dbVmSku"u8)) + { + dbVmSku = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfigurationsContent( + appLocation, + environment, + sapProduct, + databaseType, + deploymentType, + dbVmSku, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfigurationsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapDiskConfigurationsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs new file mode 100644 index 000000000000..50cb9596e7d2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of disk configurations. + public partial class SapDiskConfigurationsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The VM SKU for database instance. + /// or is null. + public SapDiskConfigurationsContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDatabaseType databaseType, SapDeploymentType deploymentType, string dbVmSku) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + Argument.AssertNotNull(dbVmSku, nameof(dbVmSku)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DatabaseType = databaseType; + DeploymentType = deploymentType; + DbVmSku = dbVmSku; + } + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The VM SKU for database instance. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfigurationsContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDatabaseType databaseType, SapDeploymentType deploymentType, string dbVmSku, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DatabaseType = databaseType; + DeploymentType = deploymentType; + DbVmSku = dbVmSku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapDiskConfigurationsContent() + { + } + + /// The geo-location where the SAP resources will be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The VM SKU for database instance. + public string DbVmSku { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs new file mode 100644 index 000000000000..498b85a78954 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfigurationsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VolumeConfigurations)) + { + writer.WritePropertyName("volumeConfigurations"u8); + writer.WriteStartObject(); + foreach (var item in VolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfigurationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfigurationsResult(document.RootElement, options); + } + + internal static SapDiskConfigurationsResult DeserializeSapDiskConfigurationsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary volumeConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("volumeConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SapDiskConfiguration.DeserializeSapDiskConfiguration(property0.Value, options)); + } + volumeConfigurations = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfigurationsResult(volumeConfigurations ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfigurationsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapDiskConfigurationsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs new file mode 100644 index 000000000000..68b5bc63cbab --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of disk configuration for vmSku which are part of SAP deployment. + public partial class SapDiskConfigurationsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapDiskConfigurationsResult() + { + VolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations, IDictionary serializedAdditionalRawData) + { + VolumeConfigurations = volumeConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IReadOnlyDictionary VolumeConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs new file mode 100644 index 000000000000..bfe16bc5eba5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the environment type - Production/Non Production. + public readonly partial struct SapEnvironmentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapEnvironmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NonProdValue = "NonProd"; + private const string ProdValue = "Prod"; + + /// Non Production SAP system. + public static SapEnvironmentType NonProd { get; } = new SapEnvironmentType(NonProdValue); + /// Production SAP system. + public static SapEnvironmentType Prod { get; } = new SapEnvironmentType(ProdValue); + /// Determines if two values are the same. + public static bool operator ==(SapEnvironmentType left, SapEnvironmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapEnvironmentType left, SapEnvironmentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapEnvironmentType(string value) => new SapEnvironmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapEnvironmentType other && Equals(other); + /// + public bool Equals(SapEnvironmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs new file mode 100644 index 000000000000..b3db96529756 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the health of SAP Instances. + public readonly partial struct SapHealthState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapHealthState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string HealthyValue = "Healthy"; + private const string UnhealthyValue = "Unhealthy"; + private const string DegradedValue = "Degraded"; + + /// SAP System health is unknown. + public static SapHealthState Unknown { get; } = new SapHealthState(UnknownValue); + /// SAP System health is healthy. + public static SapHealthState Healthy { get; } = new SapHealthState(HealthyValue); + /// SAP System is unhealthy. + public static SapHealthState Unhealthy { get; } = new SapHealthState(UnhealthyValue); + /// SAP System health is degraded. + public static SapHealthState Degraded { get; } = new SapHealthState(DegradedValue); + /// Determines if two values are the same. + public static bool operator ==(SapHealthState left, SapHealthState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHealthState left, SapHealthState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapHealthState(string value) => new SapHealthState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHealthState other && Equals(other); + /// + public bool Equals(SapHealthState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs new file mode 100644 index 000000000000..3e6a832aeff1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The high availability type (AvailabilitySet or AvailabilityZone). + public readonly partial struct SapHighAvailabilityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapHighAvailabilityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvailabilitySetValue = "AvailabilitySet"; + private const string AvailabilityZoneValue = "AvailabilityZone"; + + /// HA deployment with availability sets. + public static SapHighAvailabilityType AvailabilitySet { get; } = new SapHighAvailabilityType(AvailabilitySetValue); + /// HA deployment with availability zones. + public static SapHighAvailabilityType AvailabilityZone { get; } = new SapHighAvailabilityType(AvailabilityZoneValue); + /// Determines if two values are the same. + public static bool operator ==(SapHighAvailabilityType left, SapHighAvailabilityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHighAvailabilityType left, SapHighAvailabilityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapHighAvailabilityType(string value) => new SapHighAvailabilityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHighAvailabilityType other && Equals(other); + /// + public bool Equals(SapHighAvailabilityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..404aa6b82063 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapInstallWithoutOSConfigSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bomUrl"u8); + writer.WriteStringValue(BomUri); + writer.WritePropertyName("sapBitsStorageAccountId"u8); + writer.WriteStringValue(SapBitsStorageAccountId); + writer.WritePropertyName("softwareVersion"u8); + writer.WriteStringValue(SoftwareVersion); + if (Optional.IsDefined(HighAvailabilitySoftwareConfiguration)) + { + writer.WritePropertyName("highAvailabilitySoftwareConfiguration"u8); + writer.WriteObjectValue(HighAvailabilitySoftwareConfiguration, options); + } + } + + SapInstallWithoutOSConfigSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(document.RootElement, options); + } + + internal static SapInstallWithoutOSConfigSoftwareConfiguration DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string bomUrl = default; + string sapBitsStorageAccountId = default; + string softwareVersion = default; + HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bomUrl"u8)) + { + bomUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapBitsStorageAccountId"u8)) + { + sapBitsStorageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareVersion"u8)) + { + softwareVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("highAvailabilitySoftwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilitySoftwareConfiguration = HighAvailabilitySoftwareConfiguration.DeserializeHighAvailabilitySoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapInstallWithoutOSConfigSoftwareConfiguration( + softwareInstallationType, + serializedAdditionalRawData, + bomUrl, + sapBitsStorageAccountId, + softwareVersion, + highAvailabilitySoftwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapInstallWithoutOSConfigSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs new file mode 100644 index 000000000000..feb3c7735081 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is to be installed by service without OS Configurations. + public partial class SapInstallWithoutOSConfigSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The URL to the SAP Build of Materials(BOM) file. + /// The SAP bits storage account id. + /// The software version to install. + /// , or is null. + public SapInstallWithoutOSConfigSoftwareConfiguration(string bomUri, string sapBitsStorageAccountId, string softwareVersion) + { + Argument.AssertNotNull(bomUri, nameof(bomUri)); + Argument.AssertNotNull(sapBitsStorageAccountId, nameof(sapBitsStorageAccountId)); + Argument.AssertNotNull(softwareVersion, nameof(softwareVersion)); + + BomUri = bomUri; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SoftwareVersion = softwareVersion; + SoftwareInstallationType = SapSoftwareInstallationType.SAPInstallWithoutOSConfig; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The URL to the SAP Build of Materials(BOM) file. + /// The SAP bits storage account id. + /// The software version to install. + /// Gets or sets the HA software configuration. + internal SapInstallWithoutOSConfigSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string bomUri, string sapBitsStorageAccountId, string softwareVersion, HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration) : base(softwareInstallationType, serializedAdditionalRawData) + { + BomUri = bomUri; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SoftwareVersion = softwareVersion; + HighAvailabilitySoftwareConfiguration = highAvailabilitySoftwareConfiguration; + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal SapInstallWithoutOSConfigSoftwareConfiguration() + { + } + + /// The URL to the SAP Build of Materials(BOM) file. + public string BomUri { get; set; } + /// The SAP bits storage account id. + public string SapBitsStorageAccountId { get; set; } + /// The software version to install. + public string SoftwareVersion { get; set; } + /// Gets or sets the HA software configuration. + public HighAvailabilitySoftwareConfiguration HighAvailabilitySoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs new file mode 100644 index 000000000000..4f7c447c7964 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Product type. + public readonly partial struct SapProductType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapProductType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ECCValue = "ECC"; + private const string S4HANAValue = "S4HANA"; + private const string OtherValue = "Other"; + + /// SAP Product ECC. + public static SapProductType ECC { get; } = new SapProductType(ECCValue); + /// SAP Product S4HANA. + public static SapProductType S4HANA { get; } = new SapProductType(S4HANAValue); + /// SAP Products other than the ones listed. + public static SapProductType Other { get; } = new SapProductType(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(SapProductType left, SapProductType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapProductType left, SapProductType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapProductType(string value) => new SapProductType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapProductType other && Equals(other); + /// + public bool Equals(SapProductType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs new file mode 100644 index 000000000000..bc973a8dca70 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSizingRecommendationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("saps"u8); + writer.WriteNumberValue(Saps); + writer.WritePropertyName("dbMemory"u8); + writer.WriteNumberValue(DbMemory); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (Optional.IsDefined(DbScaleMethod)) + { + writer.WritePropertyName("dbScaleMethod"u8); + writer.WriteStringValue(DbScaleMethod.Value.ToString()); + } + if (Optional.IsDefined(HighAvailabilityType)) + { + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSizingRecommendationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationContent(document.RootElement, options); + } + + internal static SapSizingRecommendationContent DeserializeSapSizingRecommendationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDeploymentType deploymentType = default; + long saps = default; + long dbMemory = default; + SapDatabaseType databaseType = default; + SapDatabaseScaleMethod? dbScaleMethod = default; + SapHighAvailabilityType? highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("saps"u8)) + { + saps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("dbMemory"u8)) + { + dbMemory = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dbScaleMethod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbScaleMethod = new SapDatabaseScaleMethod(property.Value.GetString()); + continue; + } + if (property.NameEquals("highAvailabilityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSizingRecommendationContent( + appLocation, + environment, + sapProduct, + deploymentType, + saps, + dbMemory, + databaseType, + dbScaleMethod, + highAvailabilityType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapSizingRecommendationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs new file mode 100644 index 000000000000..a0dd7fb0d49f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Sizing Recommendation request. + public partial class SapSizingRecommendationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// is null. + public SapSizingRecommendationContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, long saps, long dbMemory, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + Saps = saps; + DbMemory = dbMemory; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// The DB scale method. + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal SapSizingRecommendationContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, long saps, long dbMemory, SapDatabaseType databaseType, SapDatabaseScaleMethod? dbScaleMethod, SapHighAvailabilityType? highAvailabilityType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + Saps = saps; + DbMemory = dbMemory; + DatabaseType = databaseType; + DbScaleMethod = dbScaleMethod; + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapSizingRecommendationContent() + { + } + + /// The geo-location where the resource is to be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The SAP Application Performance Standard measurement. + public long Saps { get; } + /// The database memory configuration. + public long DbMemory { get; } + /// The database type. + public SapDatabaseType DatabaseType { get; } + /// The DB scale method. + public SapDatabaseScaleMethod? DbScaleMethod { get; set; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..1693b8665507 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSapSizingRecommendationResult))] + public partial class SapSizingRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSizingRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + + internal static SapSizingRecommendationResult DeserializeSapSizingRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SingleServer": return SingleServerRecommendationResult.DeserializeSingleServerRecommendationResult(element, options); + case "ThreeTier": return ThreeTierRecommendationResult.DeserializeThreeTierRecommendationResult(element, options); + } + } + return UnknownSapSizingRecommendationResult.DeserializeUnknownSapSizingRecommendationResult(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs new file mode 100644 index 000000000000..82bef0761e1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP sizing recommendation result. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class SapSizingRecommendationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SapSizingRecommendationResult() + { + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal SapSizingRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) + { + DeploymentType = deploymentType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The deployment type. Eg: SingleServer/ThreeTier. + internal SapDeploymentType DeploymentType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs new file mode 100644 index 000000000000..e6f61a20b863 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP software installation Type. + internal readonly partial struct SapSoftwareInstallationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapSoftwareInstallationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceInitiatedValue = "ServiceInitiated"; + private const string SAPInstallWithoutOSConfigValue = "SAPInstallWithoutOSConfig"; + private const string ExternalValue = "External"; + + /// SAP Install managed by service. + public static SapSoftwareInstallationType ServiceInitiated { get; } = new SapSoftwareInstallationType(ServiceInitiatedValue); + /// SAP Install without OS Config. + public static SapSoftwareInstallationType SAPInstallWithoutOSConfig { get; } = new SapSoftwareInstallationType(SAPInstallWithoutOSConfigValue); + /// External software installation type. + public static SapSoftwareInstallationType External { get; } = new SapSoftwareInstallationType(ExternalValue); + /// Determines if two values are the same. + public static bool operator ==(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapSoftwareInstallationType(string value) => new SapSoftwareInstallationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapSoftwareInstallationType other && Equals(other); + /// + public bool Equals(SapSoftwareInstallationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs new file mode 100644 index 000000000000..b9540dccbf83 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedResourceSkusResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SupportedSkus)) + { + writer.WritePropertyName("supportedSkus"u8); + writer.WriteStartArray(); + foreach (var item in SupportedSkus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedResourceSkusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedResourceSkusResult(document.RootElement, options); + } + + internal static SapSupportedResourceSkusResult DeserializeSapSupportedResourceSkusResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList supportedSkus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("supportedSkus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapSupportedSku.DeserializeSapSupportedSku(item, options)); + } + supportedSkus = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedResourceSkusResult(supportedSkus ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedResourceSkusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapSupportedResourceSkusResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs new file mode 100644 index 000000000000..6eafd832c894 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of supported SKUs for different resources which are part of SAP deployment. + public partial class SapSupportedResourceSkusResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapSupportedResourceSkusResult() + { + SupportedSkus = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the list of SAP supported SKUs. + /// Keeps track of any properties unknown to the library. + internal SapSupportedResourceSkusResult(IReadOnlyList supportedSkus, IDictionary serializedAdditionalRawData) + { + SupportedSkus = supportedSkus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the list of SAP supported SKUs. + public IReadOnlyList SupportedSkus { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs new file mode 100644 index 000000000000..c49dd918f179 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VmSku)) + { + writer.WritePropertyName("vmSku"u8); + writer.WriteStringValue(VmSku); + } + if (Optional.IsDefined(IsAppServerCertified)) + { + writer.WritePropertyName("isAppServerCertified"u8); + writer.WriteBooleanValue(IsAppServerCertified.Value); + } + if (Optional.IsDefined(IsDatabaseCertified)) + { + writer.WritePropertyName("isDatabaseCertified"u8); + writer.WriteBooleanValue(IsDatabaseCertified.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedSku(document.RootElement, options); + } + + internal static SapSupportedSku DeserializeSapSupportedSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSku = default; + bool? isAppServerCertified = default; + bool? isDatabaseCertified = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSku"u8)) + { + vmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAppServerCertified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAppServerCertified = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isDatabaseCertified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDatabaseCertified = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapSupportedSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs new file mode 100644 index 000000000000..ab4e16fd5ea2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP supported SKU. + public partial class SapSupportedSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapSupportedSku() + { + } + + /// Initializes a new instance of . + /// The VM Sku. + /// True if the Sku is certified for App server in the SAP system. + /// True if the Sku is certified for Database server in the SAP system. + /// Keeps track of any properties unknown to the library. + internal SapSupportedSku(string vmSku, bool? isAppServerCertified, bool? isDatabaseCertified, IDictionary serializedAdditionalRawData) + { + VmSku = vmSku; + IsAppServerCertified = isAppServerCertified; + IsDatabaseCertified = isDatabaseCertified; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The VM Sku. + public string VmSku { get; } + /// True if the Sku is certified for App server in the SAP system. + public bool? IsAppServerCertified { get; } + /// True if the Sku is certified for Database server in the SAP system. + public bool? IsDatabaseCertified { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs new file mode 100644 index 000000000000..3c0264c582d8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedSkusContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (Optional.IsDefined(HighAvailabilityType)) + { + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedSkusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedSkusContent(document.RootElement, options); + } + + internal static SapSupportedSkusContent DeserializeSapSupportedSkusContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDeploymentType deploymentType = default; + SapDatabaseType databaseType = default; + SapHighAvailabilityType? highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("highAvailabilityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedSkusContent( + appLocation, + environment, + sapProduct, + deploymentType, + databaseType, + highAvailabilityType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedSkusContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapSupportedSkusContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs new file mode 100644 index 000000000000..9ff9a4a9fe75 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of supported SKUs. + public partial class SapSupportedSkusContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// is null. + public SapSupportedSkusContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal SapSupportedSkusContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, SapDatabaseType databaseType, SapHighAvailabilityType? highAvailabilityType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + DatabaseType = databaseType; + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapSupportedSkusContent() + { + } + + /// The geo-location where the resource is to be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs new file mode 100644 index 000000000000..4fd73960dc15 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SapVirtualInstanceError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstanceError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceError(document.RootElement, options); + } + + internal static SapVirtualInstanceError DeserializeSapVirtualInstanceError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorInformation properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ErrorInformation.DeserializeErrorInformation(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceError(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapVirtualInstanceError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs new file mode 100644 index 000000000000..7ee793a33452 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// An error response from the Virtual Instance for SAP Workload service. + internal partial class SapVirtualInstanceError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapVirtualInstanceError() + { + } + + /// Initializes a new instance of . + /// The Virtual Instance for SAP error body. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceError(ErrorInformation properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Virtual Instance for SAP error body. + public ErrorInformation Properties { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs new file mode 100644 index 000000000000..88de3f232e3b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapVirtualInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstancePatch(document.RootElement, options); + } + + internal static SapVirtualInstancePatch DeserializeSapVirtualInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + SAPVirtualInstanceIdentity identity = default; + UpdateSapVirtualInstanceProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SAPVirtualInstanceIdentity.DeserializeSAPVirtualInstanceIdentity(property.Value, options); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = UpdateSapVirtualInstanceProperties.DeserializeUpdateSapVirtualInstanceProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstancePatch(tags ?? new ChangeTrackingDictionary(), identity, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapVirtualInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs new file mode 100644 index 000000000000..d38c79714ba2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating Virtual Instance for SAP. + public partial class SapVirtualInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapVirtualInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Managed service identity (user assigned identities). + /// The update properties. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstancePatch(IDictionary tags, SAPVirtualInstanceIdentity identity, UpdateSapVirtualInstanceProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Identity = identity; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + /// Managed service identity (user assigned identities). + public SAPVirtualInstanceIdentity Identity { get; set; } + /// The update properties. + internal UpdateSapVirtualInstanceProperties Properties { get; set; } + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? UpdateSapVirtualInstanceManagedResourcesNetworkAccessType + { + get => Properties is null ? default : Properties.ManagedResourcesNetworkAccessType; + set + { + if (Properties is null) + Properties = new UpdateSapVirtualInstanceProperties(); + Properties.ManagedResourcesNetworkAccessType = value; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..8366b33ee996 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapVirtualInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + if (Optional.IsDefined(ManagedResourcesNetworkAccessType)) + { + writer.WritePropertyName("managedResourcesNetworkAccessType"u8); + writer.WriteStringValue(ManagedResourcesNetworkAccessType.Value.ToString()); + } + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration, options); + if (Optional.IsDefined(ManagedResourceGroupConfiguration)) + { + writer.WritePropertyName("managedResourceGroupConfiguration"u8); + writer.WriteObjectValue(ManagedResourceGroupConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceProperties(document.RootElement, options); + } + + internal static SapVirtualInstanceProperties DeserializeSapVirtualInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = default; + SapConfiguration configuration = default; + ManagedRGConfiguration managedResourceGroupConfiguration = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceState? state = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("managedResourcesNetworkAccessType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourcesNetworkAccessType = new ManagedResourcesNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("configuration"u8)) + { + configuration = SapConfiguration.DeserializeSapConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("managedResourceGroupConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourceGroupConfiguration = ManagedRGConfiguration.DeserializeManagedRGConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new SapVirtualInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceProperties( + environment, + sapProduct, + managedResourcesNetworkAccessType, + configuration, + managedResourceGroupConfiguration, + status, + health, + state, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapVirtualInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs new file mode 100644 index 000000000000..cd9723a6f3a6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Virtual Instance for SAP solutions resource properties. + public partial class SapVirtualInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public SapVirtualInstanceProperties(SapEnvironmentType environment, SapProductType sapProduct, SapConfiguration configuration) + { + Argument.AssertNotNull(configuration, nameof(configuration)); + + Environment = environment; + SapProduct = sapProduct; + Configuration = configuration; + } + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Managed resource group configuration. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the Virtual Instance for SAP state. + /// Defines the provisioning states. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceProperties(SapEnvironmentType environment, SapProductType sapProduct, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType, SapConfiguration configuration, ManagedRGConfiguration managedResourceGroupConfiguration, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceState? state, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + Environment = environment; + SapProduct = sapProduct; + ManagedResourcesNetworkAccessType = managedResourcesNetworkAccessType; + Configuration = configuration; + ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; + Status = status; + Health = health; + State = state; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapVirtualInstanceProperties() + { + } + + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; set; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; set; } + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? ManagedResourcesNetworkAccessType { get; set; } + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SapConfiguration Configuration { get; set; } + /// Managed resource group configuration. + internal ManagedRGConfiguration ManagedResourceGroupConfiguration { get; set; } + /// Managed resource group name. + public string ManagedResourceGroupName + { + get => ManagedResourceGroupConfiguration is null ? default : ManagedResourceGroupConfiguration.Name; + set + { + if (ManagedResourceGroupConfiguration is null) + ManagedResourceGroupConfiguration = new ManagedRGConfiguration(); + ManagedResourceGroupConfiguration.Name = value; + } + } + + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the Virtual Instance for SAP state. + public SapVirtualInstanceState? State { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs new file mode 100644 index 000000000000..2c1b19b21645 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the provisioning states. + public readonly partial struct SapVirtualInstanceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + private const string CreatingValue = "Creating"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + private const string CanceledValue = "Canceled"; + + /// ACSS succeeded provisioning state. + public static SapVirtualInstanceProvisioningState Succeeded { get; } = new SapVirtualInstanceProvisioningState(SucceededValue); + /// ACSS updating provisioning state. + public static SapVirtualInstanceProvisioningState Updating { get; } = new SapVirtualInstanceProvisioningState(UpdatingValue); + /// ACSS Creating provisioning state. + public static SapVirtualInstanceProvisioningState Creating { get; } = new SapVirtualInstanceProvisioningState(CreatingValue); + /// ACSS Failed provisioning state. + public static SapVirtualInstanceProvisioningState Failed { get; } = new SapVirtualInstanceProvisioningState(FailedValue); + /// ACSS Deleting provisioning state. + public static SapVirtualInstanceProvisioningState Deleting { get; } = new SapVirtualInstanceProvisioningState(DeletingValue); + /// ACSS Canceled provisioning state. + public static SapVirtualInstanceProvisioningState Canceled { get; } = new SapVirtualInstanceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceProvisioningState left, SapVirtualInstanceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceProvisioningState left, SapVirtualInstanceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceProvisioningState(string value) => new SapVirtualInstanceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceProvisioningState other && Equals(other); + /// + public bool Equals(SapVirtualInstanceProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs new file mode 100644 index 000000000000..b2aa043b9ae6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Virtual Instance for SAP state. + public readonly partial struct SapVirtualInstanceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfrastructureDeploymentPendingValue = "InfrastructureDeploymentPending"; + private const string InfrastructureDeploymentInProgressValue = "InfrastructureDeploymentInProgress"; + private const string InfrastructureDeploymentFailedValue = "InfrastructureDeploymentFailed"; + private const string SoftwareInstallationPendingValue = "SoftwareInstallationPending"; + private const string SoftwareInstallationInProgressValue = "SoftwareInstallationInProgress"; + private const string SoftwareInstallationFailedValue = "SoftwareInstallationFailed"; + private const string SoftwareDetectionInProgressValue = "SoftwareDetectionInProgress"; + private const string SoftwareDetectionFailedValue = "SoftwareDetectionFailed"; + private const string DiscoveryPendingValue = "DiscoveryPending"; + private const string DiscoveryInProgressValue = "DiscoveryInProgress"; + private const string DiscoveryFailedValue = "DiscoveryFailed"; + private const string RegistrationCompleteValue = "RegistrationComplete"; + private const string ACSSInstallationBlockedValue = "ACSSInstallationBlocked"; + + /// Infrastructure is not yet deployed. + public static SapVirtualInstanceState InfrastructureDeploymentPending { get; } = new SapVirtualInstanceState(InfrastructureDeploymentPendingValue); + /// Infrastructure deployment is in progress. + public static SapVirtualInstanceState InfrastructureDeploymentInProgress { get; } = new SapVirtualInstanceState(InfrastructureDeploymentInProgressValue); + /// Infrastructure deployment has failed. + public static SapVirtualInstanceState InfrastructureDeploymentFailed { get; } = new SapVirtualInstanceState(InfrastructureDeploymentFailedValue); + /// Infrastructure deployment is successful. Software installation is pending. + public static SapVirtualInstanceState SoftwareInstallationPending { get; } = new SapVirtualInstanceState(SoftwareInstallationPendingValue); + /// Software installation is in progress. + public static SapVirtualInstanceState SoftwareInstallationInProgress { get; } = new SapVirtualInstanceState(SoftwareInstallationInProgressValue); + /// Software installation failed. + public static SapVirtualInstanceState SoftwareInstallationFailed { get; } = new SapVirtualInstanceState(SoftwareInstallationFailedValue); + /// Software detection is in progress. + public static SapVirtualInstanceState SoftwareDetectionInProgress { get; } = new SapVirtualInstanceState(SoftwareDetectionInProgressValue); + /// Software detection failed. + public static SapVirtualInstanceState SoftwareDetectionFailed { get; } = new SapVirtualInstanceState(SoftwareDetectionFailedValue); + /// Registration has not started. + public static SapVirtualInstanceState DiscoveryPending { get; } = new SapVirtualInstanceState(DiscoveryPendingValue); + /// Registration is in progress. + public static SapVirtualInstanceState DiscoveryInProgress { get; } = new SapVirtualInstanceState(DiscoveryInProgressValue); + /// Registration has failed. + public static SapVirtualInstanceState DiscoveryFailed { get; } = new SapVirtualInstanceState(DiscoveryFailedValue); + /// Registration is complete. + public static SapVirtualInstanceState RegistrationComplete { get; } = new SapVirtualInstanceState(RegistrationCompleteValue); + /// ACSS installation cannot proceed. + public static SapVirtualInstanceState ACSSInstallationBlocked { get; } = new SapVirtualInstanceState(ACSSInstallationBlockedValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceState left, SapVirtualInstanceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceState left, SapVirtualInstanceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceState(string value) => new SapVirtualInstanceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceState other && Equals(other); + /// + public bool Equals(SapVirtualInstanceState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs new file mode 100644 index 000000000000..4ac8e7edc524 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Instance status. + public readonly partial struct SapVirtualInstanceStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string RunningValue = "Running"; + private const string StoppingValue = "Stopping"; + private const string OfflineValue = "Offline"; + private const string PartiallyRunningValue = "PartiallyRunning"; + private const string UnavailableValue = "Unavailable"; + private const string SoftShutdownValue = "SoftShutdown"; + + /// SAP system is getting started. + public static SapVirtualInstanceStatus Starting { get; } = new SapVirtualInstanceStatus(StartingValue); + /// SAP system is running. + public static SapVirtualInstanceStatus Running { get; } = new SapVirtualInstanceStatus(RunningValue); + /// SAP system is being stopped. + public static SapVirtualInstanceStatus Stopping { get; } = new SapVirtualInstanceStatus(StoppingValue); + /// SAP system is offline. + public static SapVirtualInstanceStatus Offline { get; } = new SapVirtualInstanceStatus(OfflineValue); + /// SAP system is partially running. + public static SapVirtualInstanceStatus PartiallyRunning { get; } = new SapVirtualInstanceStatus(PartiallyRunningValue); + /// SAP system status is unavailable. + public static SapVirtualInstanceStatus Unavailable { get; } = new SapVirtualInstanceStatus(UnavailableValue); + /// Soft shutdown of SAP system is initiated. + public static SapVirtualInstanceStatus SoftShutdown { get; } = new SapVirtualInstanceStatus(SoftShutdownValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceStatus(string value) => new SapVirtualInstanceStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceStatus other && Equals(other); + /// + public bool Equals(SapVirtualInstanceStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..2c7edde1388e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ServiceInitiatedSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bomUrl"u8); + writer.WriteStringValue(BomUri); + writer.WritePropertyName("softwareVersion"u8); + writer.WriteStringValue(SoftwareVersion); + writer.WritePropertyName("sapBitsStorageAccountId"u8); + writer.WriteStringValue(SapBitsStorageAccountId); + writer.WritePropertyName("sapFqdn"u8); + writer.WriteStringValue(SapFqdn); + writer.WritePropertyName("sshPrivateKey"u8); + writer.WriteStringValue(SshPrivateKey); + if (Optional.IsDefined(HighAvailabilitySoftwareConfiguration)) + { + writer.WritePropertyName("highAvailabilitySoftwareConfiguration"u8); + writer.WriteObjectValue(HighAvailabilitySoftwareConfiguration, options); + } + } + + ServiceInitiatedSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceInitiatedSoftwareConfiguration(document.RootElement, options); + } + + internal static ServiceInitiatedSoftwareConfiguration DeserializeServiceInitiatedSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string bomUrl = default; + string softwareVersion = default; + string sapBitsStorageAccountId = default; + string sapFqdn = default; + string sshPrivateKey = default; + HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bomUrl"u8)) + { + bomUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareVersion"u8)) + { + softwareVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapBitsStorageAccountId"u8)) + { + sapBitsStorageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapFqdn"u8)) + { + sapFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPrivateKey"u8)) + { + sshPrivateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("highAvailabilitySoftwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilitySoftwareConfiguration = HighAvailabilitySoftwareConfiguration.DeserializeHighAvailabilitySoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceInitiatedSoftwareConfiguration( + softwareInstallationType, + serializedAdditionalRawData, + bomUrl, + softwareVersion, + sapBitsStorageAccountId, + sapFqdn, + sshPrivateKey, + highAvailabilitySoftwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ServiceInitiatedSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceInitiatedSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs new file mode 100644 index 000000000000..74baf107de2a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is to be installed by service. + public partial class ServiceInitiatedSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The URL to the SAP Build of Materials(BOM) file. + /// The software version to install. + /// The SAP bits storage account id. + /// The FQDN to set for the SAP system during install. + /// The SSH private key. + /// , , , or is null. + public ServiceInitiatedSoftwareConfiguration(string bomUri, string softwareVersion, string sapBitsStorageAccountId, string sapFqdn, string sshPrivateKey) + { + Argument.AssertNotNull(bomUri, nameof(bomUri)); + Argument.AssertNotNull(softwareVersion, nameof(softwareVersion)); + Argument.AssertNotNull(sapBitsStorageAccountId, nameof(sapBitsStorageAccountId)); + Argument.AssertNotNull(sapFqdn, nameof(sapFqdn)); + Argument.AssertNotNull(sshPrivateKey, nameof(sshPrivateKey)); + + BomUri = bomUri; + SoftwareVersion = softwareVersion; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SapFqdn = sapFqdn; + SshPrivateKey = sshPrivateKey; + SoftwareInstallationType = SapSoftwareInstallationType.ServiceInitiated; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The URL to the SAP Build of Materials(BOM) file. + /// The software version to install. + /// The SAP bits storage account id. + /// The FQDN to set for the SAP system during install. + /// The SSH private key. + /// Gets or sets the HA software configuration. + internal ServiceInitiatedSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string bomUri, string softwareVersion, string sapBitsStorageAccountId, string sapFqdn, string sshPrivateKey, HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration) : base(softwareInstallationType, serializedAdditionalRawData) + { + BomUri = bomUri; + SoftwareVersion = softwareVersion; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SapFqdn = sapFqdn; + SshPrivateKey = sshPrivateKey; + HighAvailabilitySoftwareConfiguration = highAvailabilitySoftwareConfiguration; + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal ServiceInitiatedSoftwareConfiguration() + { + } + + /// The URL to the SAP Build of Materials(BOM) file. + public string BomUri { get; set; } + /// The software version to install. + public string SoftwareVersion { get; set; } + /// The SAP bits storage account id. + public string SapBitsStorageAccountId { get; set; } + /// The FQDN to set for the SAP system during install. + public string SapFqdn { get; set; } + /// The SSH private key. + public string SshPrivateKey { get; set; } + /// Gets or sets the HA software configuration. + public HighAvailabilitySoftwareConfiguration HighAvailabilitySoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs new file mode 100644 index 000000000000..8cd0c0723e90 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SharedStorageResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SharedStorageAccountName)) + { + writer.WritePropertyName("sharedStorageAccountName"u8); + writer.WriteStringValue(SharedStorageAccountName); + } + if (Optional.IsDefined(SharedStorageAccountPrivateEndPointName)) + { + writer.WritePropertyName("sharedStorageAccountPrivateEndPointName"u8); + writer.WriteStringValue(SharedStorageAccountPrivateEndPointName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SharedStorageResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharedStorageResourceNames(document.RootElement, options); + } + + internal static SharedStorageResourceNames DeserializeSharedStorageResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sharedStorageAccountName = default; + string sharedStorageAccountPrivateEndPointName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sharedStorageAccountName"u8)) + { + sharedStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sharedStorageAccountPrivateEndPointName"u8)) + { + sharedStorageAccountPrivateEndPointName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharedStorageResourceNames(sharedStorageAccountName, sharedStorageAccountPrivateEndPointName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SharedStorageResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSharedStorageResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs new file mode 100644 index 000000000000..a63616969347 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for shared storage. + public partial class SharedStorageResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SharedStorageResourceNames() + { + } + + /// Initializes a new instance of . + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + /// Keeps track of any properties unknown to the library. + internal SharedStorageResourceNames(string sharedStorageAccountName, string sharedStorageAccountPrivateEndPointName, IDictionary serializedAdditionalRawData) + { + SharedStorageAccountName = sharedStorageAccountName; + SharedStorageAccountPrivateEndPointName = sharedStorageAccountPrivateEndPointName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + public string SharedStorageAccountName { get; set; } + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + public string SharedStorageAccountPrivateEndPointName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..fcabe023bf8d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.Value.ToString()); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + if (Optional.IsDefined(DbDiskConfiguration)) + { + writer.WritePropertyName("dbDiskConfiguration"u8); + writer.WriteObjectValue(DbDiskConfiguration, options); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"u8); + writer.WriteObjectValue(CustomResourceNames, options); + } + } + + SingleServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerConfiguration(document.RootElement, options); + } + + internal static SingleServerConfiguration DeserializeSingleServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkConfiguration networkConfiguration = default; + SapDatabaseType? databaseType = default; + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + DiskConfiguration dbDiskConfiguration = default; + SingleServerCustomResourceNames customResourceNames = default; + string appResourceGroup = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("dbDiskConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbDiskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("customResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customResourceNames = SingleServerCustomResourceNames.DeserializeSingleServerCustomResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerConfiguration( + appResourceGroup, + deploymentType, + serializedAdditionalRawData, + networkConfiguration, + databaseType, + subnetId, + virtualMachineConfiguration, + dbDiskConfiguration, + customResourceNames); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SingleServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs new file mode 100644 index 000000000000..0c9786b43b71 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the single server configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409). + public partial class SingleServerConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// , or is null. + public SingleServerConfiguration(string appResourceGroup, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration) : base(appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + DeploymentType = SapDeploymentType.SingleServer; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// Network configuration for the server. + /// The database type. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// Gets or sets the disk configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal SingleServerConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, NetworkConfiguration networkConfiguration, SapDatabaseType? databaseType, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, DiskConfiguration dbDiskConfiguration, SingleServerCustomResourceNames customResourceNames) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + NetworkConfiguration = networkConfiguration; + DatabaseType = databaseType; + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + DbDiskConfiguration = dbDiskConfiguration; + CustomResourceNames = customResourceNames; + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal SingleServerConfiguration() + { + } + + /// Network configuration for the server. + internal NetworkConfiguration NetworkConfiguration { get; set; } + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled + { + get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; + set + { + if (NetworkConfiguration is null) + NetworkConfiguration = new NetworkConfiguration(); + NetworkConfiguration.IsSecondaryIPEnabled = value; + } + } + + /// The database type. + public SapDatabaseType? DatabaseType { get; set; } + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DbDiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DbDiskConfiguration is null) + DbDiskConfiguration = new DiskConfiguration(); + return DbDiskConfiguration.DiskVolumeConfigurations; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public SingleServerCustomResourceNames CustomResourceNames { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..38e2a2d95596 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSingleServerCustomResourceNames))] + public partial class SingleServerCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("namingPatternType"u8); + writer.WriteStringValue(NamingPatternType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SingleServerCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + + internal static SingleServerCustomResourceNames DeserializeSingleServerCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return SingleServerFullResourceNames.DeserializeSingleServerFullResourceNames(element, options); + } + } + return UnknownSingleServerCustomResourceNames.DeserializeUnknownSingleServerCustomResourceNames(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs new file mode 100644 index 000000000000..707269bbfa9c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class SingleServerCustomResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SingleServerCustomResourceNames() + { + } + + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + internal SingleServerCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The naming pattern type. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..cb9868b39cd1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VirtualMachine)) + { + writer.WritePropertyName("virtualMachine"u8); + writer.WriteObjectValue(VirtualMachine, options); + } + } + + SingleServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerFullResourceNames(document.RootElement, options); + } + + internal static SingleServerFullResourceNames DeserializeSingleServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VirtualMachineResourceNames virtualMachine = default; + NamingPatternType namingPatternType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachine"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachine = VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerFullResourceNames(namingPatternType, serializedAdditionalRawData, virtualMachine); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs new file mode 100644 index 000000000000..5d2c0d9d3cec --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a single server SAP system. + public partial class SingleServerFullResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of . + public SingleServerFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + /// The resource names object for virtual machine and related resources. + internal SingleServerFullResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData, VirtualMachineResourceNames virtualMachine) : base(namingPatternType, serializedAdditionalRawData) + { + VirtualMachine = virtualMachine; + NamingPatternType = namingPatternType; + } + + /// The resource names object for virtual machine and related resources. + public VirtualMachineResourceNames VirtualMachine { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..73ac4704243a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VmSku)) + { + writer.WritePropertyName("vmSku"u8); + writer.WriteStringValue(VmSku); + } + } + + SingleServerRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerRecommendationResult(document.RootElement, options); + } + + internal static SingleServerRecommendationResult DeserializeSingleServerRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSku = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSku"u8)) + { + vmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerRecommendationResult(deploymentType, serializedAdditionalRawData, vmSku); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SingleServerRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleServerRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs new file mode 100644 index 000000000000..8da9f7ba1dba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The recommended configuration for a single server SAP system. + public partial class SingleServerRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + internal SingleServerRecommendationResult() + { + DeploymentType = SapDeploymentType.SingleServer; + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// The recommended VM SKU for single server. + internal SingleServerRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, string vmSku) : base(deploymentType, serializedAdditionalRawData) + { + VmSku = vmSku; + DeploymentType = deploymentType; + } + + /// The recommended VM SKU for single server. + public string VmSku { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..c153005acc79 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SkipFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SkipFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSkipFileShareConfiguration(document.RootElement, options); + } + + internal static SkipFileShareConfiguration DeserializeSkipFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SkipFileShareConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SkipFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSkipFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs new file mode 100644 index 000000000000..0c117b45e74e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration for scenarios where transport directory fileshare is not created or required. + public partial class SkipFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + public SkipFileShareConfiguration() + { + ConfigurationType = FileShareConfigurationType.Skip; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal SkipFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..8994068b2d94 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSoftwareConfiguration))] + public partial class SoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("softwareInstallationType"u8); + writer.WriteStringValue(SoftwareInstallationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + + internal static SoftwareConfiguration DeserializeSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("softwareInstallationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "External": return ExternalInstallationSoftwareConfiguration.DeserializeExternalInstallationSoftwareConfiguration(element, options); + case "SAPInstallWithoutOSConfig": return SapInstallWithoutOSConfigSoftwareConfiguration.DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(element, options); + case "ServiceInitiated": return ServiceInitiatedSoftwareConfiguration.DeserializeServiceInitiatedSoftwareConfiguration(element, options); + } + } + return UnknownSoftwareConfiguration.DeserializeUnknownSoftwareConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs new file mode 100644 index 000000000000..571c580ec4b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP Software configuration Input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class SoftwareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SoftwareConfiguration() + { + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + internal SoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData) + { + SoftwareInstallationType = softwareInstallationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The SAP software installation type. + internal SapSoftwareInstallationType SoftwareInstallationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs new file mode 100644 index 000000000000..9f7f91fa435f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SshConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(PublicKeys)) + { + writer.WritePropertyName("publicKeys"u8); + writer.WriteStartArray(); + foreach (var item in PublicKeys) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshConfiguration(document.RootElement, options); + } + + internal static SshConfiguration DeserializeSshConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList publicKeys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SshPublicKey.DeserializeSshPublicKey(item, options)); + } + publicKeys = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshConfiguration(publicKeys ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SshConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSshConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs new file mode 100644 index 000000000000..316b88634fcc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// SSH configuration for Linux based VMs running on Azure. + internal partial class SshConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshConfiguration() + { + PublicKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of SSH public keys used to authenticate with linux based VMs. + /// Keeps track of any properties unknown to the library. + internal SshConfiguration(IList publicKeys, IDictionary serializedAdditionalRawData) + { + PublicKeys = publicKeys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of SSH public keys used to authenticate with linux based VMs. + public IList PublicKeys { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs new file mode 100644 index 000000000000..ad1c67a3c347 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SshKeyPair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshKeyPair)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PublicKey)) + { + writer.WritePropertyName("publicKey"u8); + writer.WriteStringValue(PublicKey); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"u8); + writer.WriteStringValue(PrivateKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshKeyPair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshKeyPair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshKeyPair(document.RootElement, options); + } + + internal static SshKeyPair DeserializeSshKeyPair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publicKey = default; + string privateKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicKey"u8)) + { + publicKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey"u8)) + { + privateKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshKeyPair(publicKey, privateKey, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshKeyPair)} does not support writing '{options.Format}' format."); + } + } + + SshKeyPair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSshKeyPair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshKeyPair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs new file mode 100644 index 000000000000..f9d170196f73 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SSH Key-pair used to authenticate with the VM. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + public partial class SshKeyPair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshKeyPair() + { + } + + /// Initializes a new instance of . + /// SSH public key. + /// SSH private key. + /// Keeps track of any properties unknown to the library. + internal SshKeyPair(string publicKey, string privateKey, IDictionary serializedAdditionalRawData) + { + PublicKey = publicKey; + PrivateKey = privateKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SSH public key. + public string PublicKey { get; set; } + /// SSH private key. + public string PrivateKey { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs new file mode 100644 index 000000000000..b43fc989a4c7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SshPublicKey : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshPublicKey)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyData)) + { + writer.WritePropertyName("keyData"u8); + writer.WriteStringValue(KeyData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshPublicKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshPublicKey)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshPublicKey(document.RootElement, options); + } + + internal static SshPublicKey DeserializeSshPublicKey(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keyData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyData"u8)) + { + keyData = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshPublicKey(keyData, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshPublicKey)} does not support writing '{options.Format}' format."); + } + } + + SshPublicKey IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSshPublicKey(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshPublicKey)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs new file mode 100644 index 000000000000..f5eab58038c4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. + public partial class SshPublicKey + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshPublicKey() + { + } + + /// Initializes a new instance of . + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + /// Keeps track of any properties unknown to the library. + internal SshPublicKey(string keyData, IDictionary serializedAdditionalRawData) + { + KeyData = keyData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + public string KeyData { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs new file mode 100644 index 000000000000..99284165623f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class StartContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StartContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StartVm)) + { + writer.WritePropertyName("startVm"u8); + writer.WriteBooleanValue(StartVm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StartContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStartContent(document.RootElement, options); + } + + internal static StartContent DeserializeStartContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? startVm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startVm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startVm = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StartContent(startVm, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StartContent)} does not support writing '{options.Format}' format."); + } + } + + StartContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStartContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StartContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs new file mode 100644 index 000000000000..c9b715489611 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Start SAP instance(s) request body. + public partial class StartContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StartContent() + { + } + + /// Initializes a new instance of . + /// The boolean value indicates whether to start the virtual machines before starting the SAP instances. + /// Keeps track of any properties unknown to the library. + internal StartContent(bool? startVm, IDictionary serializedAdditionalRawData) + { + StartVm = startVm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The boolean value indicates whether to start the virtual machines before starting the SAP instances. + public bool? StartVm { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs new file mode 100644 index 000000000000..6cf5a397631a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class StopContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SoftStopTimeoutSeconds)) + { + writer.WritePropertyName("softStopTimeoutSeconds"u8); + writer.WriteNumberValue(SoftStopTimeoutSeconds.Value); + } + if (Optional.IsDefined(DeallocateVm)) + { + writer.WritePropertyName("deallocateVm"u8); + writer.WriteBooleanValue(DeallocateVm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStopContent(document.RootElement, options); + } + + internal static StopContent DeserializeStopContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? softStopTimeoutSeconds = default; + bool? deallocateVm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softStopTimeoutSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softStopTimeoutSeconds = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("deallocateVm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deallocateVm = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StopContent(softStopTimeoutSeconds, deallocateVm, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StopContent)} does not support writing '{options.Format}' format."); + } + } + + StopContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStopContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StopContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs new file mode 100644 index 000000000000..19f256f99e5c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Stop SAP instance(s) request body. + public partial class StopContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StopContent() + { + } + + /// Initializes a new instance of . + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + /// The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. + /// Keeps track of any properties unknown to the library. + internal StopContent(long? softStopTimeoutSeconds, bool? deallocateVm, IDictionary serializedAdditionalRawData) + { + SoftStopTimeoutSeconds = softStopTimeoutSeconds; + DeallocateVm = deallocateVm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + public long? SoftStopTimeoutSeconds { get; set; } + /// The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. + public bool? DeallocateVm { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs new file mode 100644 index 000000000000..493d53e139a2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class StorageConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TransportFileShareConfiguration)) + { + writer.WritePropertyName("transportFileShareConfiguration"u8); + writer.WriteObjectValue(TransportFileShareConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageConfiguration(document.RootElement, options); + } + + internal static StorageConfiguration DeserializeStorageConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfiguration transportFileShareConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("transportFileShareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + transportFileShareConfiguration = FileShareConfiguration.DeserializeFileShareConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageConfiguration(transportFileShareConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support writing '{options.Format}' format."); + } + } + + StorageConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStorageConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs new file mode 100644 index 000000000000..faaba7453055 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the storage configuration. + internal partial class StorageConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StorageConfiguration() + { + } + + /// Initializes a new instance of . + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal StorageConfiguration(FileShareConfiguration transportFileShareConfiguration, IDictionary serializedAdditionalRawData) + { + TransportFileShareConfiguration = transportFileShareConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration TransportFileShareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs new file mode 100644 index 000000000000..ccd820bcdb35 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + writer.WritePropertyName("centralServer"u8); + writer.WriteObjectValue(CentralServer, options); + writer.WritePropertyName("applicationServer"u8); + writer.WriteObjectValue(ApplicationServer, options); + writer.WritePropertyName("databaseServer"u8); + writer.WriteObjectValue(DatabaseServer, options); + if (Optional.IsDefined(HighAvailabilityConfig)) + { + writer.WritePropertyName("highAvailabilityConfig"u8); + writer.WriteObjectValue(HighAvailabilityConfig, options); + } + if (Optional.IsDefined(StorageConfiguration)) + { + writer.WritePropertyName("storageConfiguration"u8); + writer.WriteObjectValue(StorageConfiguration, options); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"u8); + writer.WriteObjectValue(CustomResourceNames, options); + } + } + + ThreeTierConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierConfiguration(document.RootElement, options); + } + + internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkConfiguration networkConfiguration = default; + CentralServerConfiguration centralServer = default; + ApplicationServerConfiguration applicationServer = default; + DatabaseConfiguration databaseServer = default; + HighAvailabilityConfiguration highAvailabilityConfig = default; + StorageConfiguration storageConfiguration = default; + ThreeTierCustomResourceNames customResourceNames = default; + string appResourceGroup = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("centralServer"u8)) + { + centralServer = CentralServerConfiguration.DeserializeCentralServerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("applicationServer"u8)) + { + applicationServer = ApplicationServerConfiguration.DeserializeApplicationServerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("databaseServer"u8)) + { + databaseServer = DatabaseConfiguration.DeserializeDatabaseConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("highAvailabilityConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityConfig = HighAvailabilityConfiguration.DeserializeHighAvailabilityConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("storageConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageConfiguration = StorageConfiguration.DeserializeStorageConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("customResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customResourceNames = ThreeTierCustomResourceNames.DeserializeThreeTierCustomResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierConfiguration( + appResourceGroup, + deploymentType, + serializedAdditionalRawData, + networkConfiguration, + centralServer, + applicationServer, + databaseServer, + highAvailabilityConfig, + storageConfiguration, + customResourceNames); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeThreeTierConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs new file mode 100644 index 000000000000..dd9e9cc5eff0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the three tier SAP configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409). + public partial class ThreeTierConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The central server configuration. + /// The application server configuration. + /// The database configuration. + /// , , or is null. + public ThreeTierConfiguration(string appResourceGroup, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer) : base(appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + Argument.AssertNotNull(centralServer, nameof(centralServer)); + Argument.AssertNotNull(applicationServer, nameof(applicationServer)); + Argument.AssertNotNull(databaseServer, nameof(databaseServer)); + + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + DeploymentType = SapDeploymentType.ThreeTier; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// Network configuration common to all servers. + /// The central server configuration. + /// The application server configuration. + /// The database configuration. + /// The high availability configuration. + /// The storage configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal ThreeTierConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, NetworkConfiguration networkConfiguration, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer, HighAvailabilityConfiguration highAvailabilityConfig, StorageConfiguration storageConfiguration, ThreeTierCustomResourceNames customResourceNames) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + NetworkConfiguration = networkConfiguration; + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + HighAvailabilityConfig = highAvailabilityConfig; + StorageConfiguration = storageConfiguration; + CustomResourceNames = customResourceNames; + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal ThreeTierConfiguration() + { + } + + /// Network configuration common to all servers. + internal NetworkConfiguration NetworkConfiguration { get; set; } + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled + { + get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; + set + { + if (NetworkConfiguration is null) + NetworkConfiguration = new NetworkConfiguration(); + NetworkConfiguration.IsSecondaryIPEnabled = value; + } + } + + /// The central server configuration. + public CentralServerConfiguration CentralServer { get; set; } + /// The application server configuration. + public ApplicationServerConfiguration ApplicationServer { get; set; } + /// The database configuration. + public DatabaseConfiguration DatabaseServer { get; set; } + /// The high availability configuration. + internal HighAvailabilityConfiguration HighAvailabilityConfig { get; set; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType + { + get => HighAvailabilityConfig is null ? default(SapHighAvailabilityType?) : HighAvailabilityConfig.HighAvailabilityType; + set + { + HighAvailabilityConfig = value.HasValue ? new HighAvailabilityConfiguration(value.Value) : null; + } + } + + /// The storage configuration. + internal StorageConfiguration StorageConfiguration { get; set; } + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration StorageTransportFileShareConfiguration + { + get => StorageConfiguration is null ? default : StorageConfiguration.TransportFileShareConfiguration; + set + { + if (StorageConfiguration is null) + StorageConfiguration = new StorageConfiguration(); + StorageConfiguration.TransportFileShareConfiguration = value; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public ThreeTierCustomResourceNames CustomResourceNames { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..eb1273a2d900 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownThreeTierCustomResourceNames))] + public partial class ThreeTierCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("namingPatternType"u8); + writer.WriteStringValue(NamingPatternType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ThreeTierCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + + internal static ThreeTierCustomResourceNames DeserializeThreeTierCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return ThreeTierFullResourceNames.DeserializeThreeTierFullResourceNames(element, options); + } + } + return UnknownThreeTierCustomResourceNames.DeserializeUnknownThreeTierCustomResourceNames(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs new file mode 100644 index 000000000000..1da2eab3183d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class ThreeTierCustomResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ThreeTierCustomResourceNames() + { + } + + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + internal ThreeTierCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The pattern type to be used for resource naming. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..f0a4a9469615 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServer)) + { + writer.WritePropertyName("centralServer"u8); + writer.WriteObjectValue(CentralServer, options); + } + if (Optional.IsDefined(ApplicationServer)) + { + writer.WritePropertyName("applicationServer"u8); + writer.WriteObjectValue(ApplicationServer, options); + } + if (Optional.IsDefined(DatabaseServer)) + { + writer.WritePropertyName("databaseServer"u8); + writer.WriteObjectValue(DatabaseServer, options); + } + if (Optional.IsDefined(SharedStorage)) + { + writer.WritePropertyName("sharedStorage"u8); + writer.WriteObjectValue(SharedStorage, options); + } + } + + ThreeTierFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierFullResourceNames(document.RootElement, options); + } + + internal static ThreeTierFullResourceNames DeserializeThreeTierFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CentralServerFullResourceNames centralServer = default; + ApplicationServerFullResourceNames applicationServer = default; + DatabaseServerFullResourceNames databaseServer = default; + SharedStorageResourceNames sharedStorage = default; + NamingPatternType namingPatternType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + centralServer = CentralServerFullResourceNames.DeserializeCentralServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("applicationServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationServer = ApplicationServerFullResourceNames.DeserializeApplicationServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("databaseServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseServer = DatabaseServerFullResourceNames.DeserializeDatabaseServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("sharedStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sharedStorage = SharedStorageResourceNames.DeserializeSharedStorageResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierFullResourceNames( + namingPatternType, + serializedAdditionalRawData, + centralServer, + applicationServer, + databaseServer, + sharedStorage); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeThreeTierFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs new file mode 100644 index 000000000000..30dac04bfc8d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a three tier SAP system. + public partial class ThreeTierFullResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of . + public ThreeTierFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + /// The full resource names object for central server layer resources. + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + /// The resource names object for shared storage. + internal ThreeTierFullResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData, CentralServerFullResourceNames centralServer, ApplicationServerFullResourceNames applicationServer, DatabaseServerFullResourceNames databaseServer, SharedStorageResourceNames sharedStorage) : base(namingPatternType, serializedAdditionalRawData) + { + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + SharedStorage = sharedStorage; + NamingPatternType = namingPatternType; + } + + /// The full resource names object for central server layer resources. + public CentralServerFullResourceNames CentralServer { get; set; } + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public ApplicationServerFullResourceNames ApplicationServer { get; set; } + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public DatabaseServerFullResourceNames DatabaseServer { get; set; } + /// The resource names object for shared storage. + public SharedStorageResourceNames SharedStorage { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..3cb091fff77b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(DbVmSku)) + { + writer.WritePropertyName("dbVmSku"u8); + writer.WriteStringValue(DbVmSku); + } + if (Optional.IsDefined(DatabaseInstanceCount)) + { + writer.WritePropertyName("databaseInstanceCount"u8); + writer.WriteNumberValue(DatabaseInstanceCount.Value); + } + if (Optional.IsDefined(CentralServerVmSku)) + { + writer.WritePropertyName("centralServerVmSku"u8); + writer.WriteStringValue(CentralServerVmSku); + } + if (Optional.IsDefined(CentralServerInstanceCount)) + { + writer.WritePropertyName("centralServerInstanceCount"u8); + writer.WriteNumberValue(CentralServerInstanceCount.Value); + } + if (Optional.IsDefined(ApplicationServerVmSku)) + { + writer.WritePropertyName("applicationServerVmSku"u8); + writer.WriteStringValue(ApplicationServerVmSku); + } + if (Optional.IsDefined(ApplicationServerInstanceCount)) + { + writer.WritePropertyName("applicationServerInstanceCount"u8); + writer.WriteNumberValue(ApplicationServerInstanceCount.Value); + } + } + + ThreeTierRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierRecommendationResult(document.RootElement, options); + } + + internal static ThreeTierRecommendationResult DeserializeThreeTierRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dbVmSku = default; + long? databaseInstanceCount = default; + string centralServerVmSku = default; + long? centralServerInstanceCount = default; + string applicationServerVmSku = default; + long? applicationServerInstanceCount = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbVmSku"u8)) + { + dbVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("centralServerVmSku"u8)) + { + centralServerVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("centralServerInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + centralServerInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("applicationServerVmSku"u8)) + { + applicationServerVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("applicationServerInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationServerInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierRecommendationResult( + deploymentType, + serializedAdditionalRawData, + dbVmSku, + databaseInstanceCount, + centralServerVmSku, + centralServerInstanceCount, + applicationServerVmSku, + applicationServerInstanceCount); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeThreeTierRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs new file mode 100644 index 000000000000..cf68c754d75d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The recommended configuration for a three tier SAP system. + public partial class ThreeTierRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + internal ThreeTierRecommendationResult() + { + DeploymentType = SapDeploymentType.ThreeTier; + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// The database VM SKU. + /// The database server instance count. + /// The central server VM SKU. + /// The central server instance count. + /// The application server VM SKU. + /// The application server instance count. + internal ThreeTierRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, string dbVmSku, long? databaseInstanceCount, string centralServerVmSku, long? centralServerInstanceCount, string applicationServerVmSku, long? applicationServerInstanceCount) : base(deploymentType, serializedAdditionalRawData) + { + DbVmSku = dbVmSku; + DatabaseInstanceCount = databaseInstanceCount; + CentralServerVmSku = centralServerVmSku; + CentralServerInstanceCount = centralServerInstanceCount; + ApplicationServerVmSku = applicationServerVmSku; + ApplicationServerInstanceCount = applicationServerInstanceCount; + DeploymentType = deploymentType; + } + + /// The database VM SKU. + public string DbVmSku { get; } + /// The database server instance count. + public long? DatabaseInstanceCount { get; } + /// The central server VM SKU. + public string CentralServerVmSku { get; } + /// The central server instance count. + public long? CentralServerInstanceCount { get; } + /// The application server VM SKU. + public string ApplicationServerVmSku { get; } + /// The application server instance count. + public long? ApplicationServerInstanceCount { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..409b431928a1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + + internal static UnknownFileShareConfiguration DeserializeUnknownFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfigurationType configurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownFileShareConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs new file mode 100644 index 000000000000..d3588642b83c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of FileShareConfiguration. + internal partial class UnknownFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal UnknownFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownFileShareConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs new file mode 100644 index 000000000000..ead7dc3103bc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownInfrastructureConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + InfrastructureConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + + internal static UnknownInfrastructureConfiguration DeserializeUnknownInfrastructureConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appResourceGroup = default; + SapDeploymentType deploymentType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownInfrastructureConfiguration(appResourceGroup, deploymentType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{options.Format}' format."); + } + } + + InfrastructureConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs new file mode 100644 index 000000000000..8cd6afc1beef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of InfrastructureConfiguration. + internal partial class UnknownInfrastructureConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal UnknownInfrastructureConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownInfrastructureConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs new file mode 100644 index 000000000000..8dbe66802215 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownOSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + OSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSConfiguration(document.RootElement, options); + } + + internal static UnknownOSConfiguration DeserializeUnknownOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OSType osType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownOSConfiguration(osType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs new file mode 100644 index 000000000000..266b67037b5b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of OSConfiguration. + internal partial class UnknownOSConfiguration : OSConfiguration + { + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal UnknownOSConfiguration(OSType osType, IDictionary serializedAdditionalRawData) : base(osType, serializedAdditionalRawData) + { + OSType = osType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownOSConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs new file mode 100644 index 000000000000..cc2175ca19ee --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapConfiguration(document.RootElement, options); + } + + internal static UnknownSapConfiguration DeserializeUnknownSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapConfigurationType configurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSapConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs new file mode 100644 index 000000000000..43650e6a5ae5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SapConfiguration. + internal partial class UnknownSapConfiguration : SapConfiguration + { + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + internal UnknownSapConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSapConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..7efea643935f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSapSizingRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SapSizingRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + + internal static UnknownSapSizingRecommendationResult DeserializeUnknownSapSizingRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDeploymentType deploymentType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSapSizingRecommendationResult(deploymentType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs new file mode 100644 index 000000000000..aed574f9819d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SapSizingRecommendationResult. + internal partial class UnknownSapSizingRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal UnknownSapSizingRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) : base(deploymentType, serializedAdditionalRawData) + { + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSapSizingRecommendationResult() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..ba04977e1530 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSingleServerCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SingleServerCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + + internal static UnknownSingleServerCustomResourceNames DeserializeUnknownSingleServerCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NamingPatternType namingPatternType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSingleServerCustomResourceNames(namingPatternType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs new file mode 100644 index 000000000000..ca9167a891c3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SingleServerCustomResourceNames. + internal partial class UnknownSingleServerCustomResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + internal UnknownSingleServerCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) : base(namingPatternType, serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSingleServerCustomResourceNames() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..9606905c8e62 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + + internal static UnknownSoftwareConfiguration DeserializeUnknownSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapSoftwareInstallationType softwareInstallationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSoftwareConfiguration(softwareInstallationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs new file mode 100644 index 000000000000..469cfda732f1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SoftwareConfiguration. + internal partial class UnknownSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + internal UnknownSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData) : base(softwareInstallationType, serializedAdditionalRawData) + { + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSoftwareConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..749200c8bb45 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownThreeTierCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ThreeTierCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + + internal static UnknownThreeTierCustomResourceNames DeserializeUnknownThreeTierCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NamingPatternType namingPatternType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownThreeTierCustomResourceNames(namingPatternType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs new file mode 100644 index 000000000000..35ac6ef0a5f0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of ThreeTierCustomResourceNames. + internal partial class UnknownThreeTierCustomResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + internal UnknownThreeTierCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) : base(namingPatternType, serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownThreeTierCustomResourceNames() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..eab6cf7ba249 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UpdateSapVirtualInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ManagedResourcesNetworkAccessType)) + { + writer.WritePropertyName("managedResourcesNetworkAccessType"u8); + writer.WriteStringValue(ManagedResourcesNetworkAccessType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UpdateSapVirtualInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUpdateSapVirtualInstanceProperties(document.RootElement, options); + } + + internal static UpdateSapVirtualInstanceProperties DeserializeUpdateSapVirtualInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("managedResourcesNetworkAccessType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourcesNetworkAccessType = new ManagedResourcesNetworkAccessType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UpdateSapVirtualInstanceProperties(managedResourcesNetworkAccessType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + UpdateSapVirtualInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUpdateSapVirtualInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs new file mode 100644 index 000000000000..5a311122d9de --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the update request body properties for updating Virtual Instance for SAP. + internal partial class UpdateSapVirtualInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public UpdateSapVirtualInstanceProperties() + { + } + + /// Initializes a new instance of . + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// Keeps track of any properties unknown to the library. + internal UpdateSapVirtualInstanceProperties(ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType, IDictionary serializedAdditionalRawData) + { + ManagedResourcesNetworkAccessType = managedResourcesNetworkAccessType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? ManagedResourcesNetworkAccessType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs new file mode 100644 index 000000000000..517fad1a0331 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class VirtualMachineConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + writer.WritePropertyName("osProfile"u8); + writer.WriteObjectValue(OSProfile, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualMachineConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + + internal static VirtualMachineConfiguration DeserializeVirtualMachineConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSize = default; + ImageReference imageReference = default; + OSProfile osProfile = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("imageReference"u8)) + { + imageReference = ImageReference.DeserializeImageReference(property.Value, options); + continue; + } + if (property.NameEquals("osProfile"u8)) + { + osProfile = OSProfile.DeserializeOSProfile(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineConfiguration(vmSize, imageReference, osProfile, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs new file mode 100644 index 000000000000..7292e4ec577f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the virtual machine configuration. + public partial class VirtualMachineConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The virtual machine size. + /// The image reference. + /// The OS profile. + /// , or is null. + public VirtualMachineConfiguration(string vmSize, ImageReference imageReference, OSProfile osProfile) + { + Argument.AssertNotNull(vmSize, nameof(vmSize)); + Argument.AssertNotNull(imageReference, nameof(imageReference)); + Argument.AssertNotNull(osProfile, nameof(osProfile)); + + VmSize = vmSize; + ImageReference = imageReference; + OSProfile = osProfile; + } + + /// Initializes a new instance of . + /// The virtual machine size. + /// The image reference. + /// The OS profile. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineConfiguration(string vmSize, ImageReference imageReference, OSProfile osProfile, IDictionary serializedAdditionalRawData) + { + VmSize = vmSize; + ImageReference = imageReference; + OSProfile = osProfile; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VirtualMachineConfiguration() + { + } + + /// The virtual machine size. + public string VmSize { get; set; } + /// The image reference. + public ImageReference ImageReference { get; set; } + /// The OS profile. + public OSProfile OSProfile { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs new file mode 100644 index 000000000000..684f6d4a0c3e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class VirtualMachineResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VmName)) + { + writer.WritePropertyName("vmName"u8); + writer.WriteStringValue(VmName); + } + if (Optional.IsDefined(HostName)) + { + writer.WritePropertyName("hostName"u8); + writer.WriteStringValue(HostName); + } + if (Optional.IsCollectionDefined(NetworkInterfaces)) + { + writer.WritePropertyName("networkInterfaces"u8); + writer.WriteStartArray(); + foreach (var item in NetworkInterfaces) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OSDiskName)) + { + writer.WritePropertyName("osDiskName"u8); + writer.WriteStringValue(OSDiskName); + } + if (Optional.IsCollectionDefined(DataDiskNames)) + { + writer.WritePropertyName("dataDiskNames"u8); + writer.WriteStartObject(); + foreach (var item in DataDiskNames) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteStringValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualMachineResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineResourceNames(document.RootElement, options); + } + + internal static VirtualMachineResourceNames DeserializeVirtualMachineResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmName = default; + string hostName = default; + IList networkInterfaces = default; + string osDiskName = default; + IDictionary> dataDiskNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmName"u8)) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostName"u8)) + { + hostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkInterfaces"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkInterfaceResourceNames.DeserializeNetworkInterfaceResourceNames(item, options)); + } + networkInterfaces = array; + continue; + } + if (property.NameEquals("osDiskName"u8)) + { + osDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataDiskNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dictionary.Add(property0.Name, array); + } + } + dataDiskNames = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineResourceNames( + vmName, + hostName, + networkInterfaces ?? new ChangeTrackingList(), + osDiskName, + dataDiskNames ?? new ChangeTrackingDictionary>(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVirtualMachineResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs new file mode 100644 index 000000000000..f1e4d4439a2a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for virtual machine and related resources. + public partial class VirtualMachineResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VirtualMachineResourceNames() + { + NetworkInterfaces = new ChangeTrackingList(); + DataDiskNames = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of . + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineResourceNames(string vmName, string hostName, IList networkInterfaces, string osDiskName, IDictionary> dataDiskNames, IDictionary serializedAdditionalRawData) + { + VmName = vmName; + HostName = hostName; + NetworkInterfaces = networkInterfaces; + OSDiskName = osDiskName; + DataDiskNames = dataDiskNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + public string VmName { get; set; } + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + public string HostName { get; set; } + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + public IList NetworkInterfaces { get; } + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + public string OSDiskName { get; set; } + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + public IDictionary> DataDiskNames { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs new file mode 100644 index 000000000000..c374218bffed --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class WindowsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + WindowsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + + internal static WindowsConfiguration DeserializeWindowsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OSType osType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WindowsConfiguration(osType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + WindowsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs new file mode 100644 index 000000000000..55729d7198eb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies Windows operating system settings on the virtual machine. + public partial class WindowsConfiguration : OSConfiguration + { + /// Initializes a new instance of . + public WindowsConfiguration() + { + OSType = OSType.Windows; + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal WindowsConfiguration(OSType osType, IDictionary serializedAdditionalRawData) : base(osType, serializedAdditionalRawData) + { + OSType = osType; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..c33e111ebe5c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs new file mode 100644 index 000000000000..6cd8cd64f6d2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapApplicationServerInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapApplicationServerInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapApplicationServerInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapApplicationServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapApplicationServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Puts the SAP Application Server Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Puts the SAP Application Server Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs new file mode 100644 index 000000000000..905bcc7d3c5f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapCentralServerInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapCentralServerInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapCentralServerInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Central Services Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapCentralServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Central Services Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapCentralServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs new file mode 100644 index 000000000000..379085ffd88e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapDatabaseInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapDatabaseInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapDatabaseInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Database Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapDatabaseInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Database Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapDatabaseInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Database resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Database resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// SAP Database server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// SAP Database server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs new file mode 100644 index 000000000000..6a8830126e7f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs @@ -0,0 +1,1281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapVirtualInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapVirtualInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapVirtualInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapVirtualInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapVirtualInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapVirtualInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapVirtualInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a Virtual Instance for SAP solutions (VIS) resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a Virtual Instance for SAP solutions (VIS) resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSizingRecommendationsRequestUri(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSizingRecommendations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSizingRecommendationsRequest(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSizingRecommendations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Gets the sizing recommendations. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetSizingRecommendationsAsync(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSizingRecommendationsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapSizingRecommendationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapSizingRecommendationResult.DeserializeSapSizingRecommendationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the sizing recommendations. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetSizingRecommendations(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSizingRecommendationsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapSizingRecommendationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapSizingRecommendationResult.DeserializeSapSizingRecommendationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSapSupportedSkuRequestUri(string subscriptionId, AzureLocation location, SapSupportedSkusContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSapSupportedSku", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSapSupportedSkuRequest(string subscriptionId, AzureLocation location, SapSupportedSkusContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSapSupportedSku", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetSapSupportedSkuAsync(string subscriptionId, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSapSupportedSkuRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapSupportedResourceSkusResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapSupportedResourceSkusResult.DeserializeSapSupportedResourceSkusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetSapSupportedSku(string subscriptionId, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSapSupportedSkuRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapSupportedResourceSkusResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapSupportedResourceSkusResult.DeserializeSapSupportedResourceSkusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetDiskConfigurationsRequestUri(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getDiskConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDiskConfigurationsRequest(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getDiskConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetDiskConfigurationsAsync(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDiskConfigurationsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDiskConfigurationsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapDiskConfigurationsResult.DeserializeSapDiskConfigurationsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetDiskConfigurations(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDiskConfigurationsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDiskConfigurationsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapDiskConfigurationsResult.DeserializeSapDiskConfigurationsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAvailabilityZoneDetailsRequestUri(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAvailabilityZoneDetailsRequest(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAvailabilityZoneDetailsAsync(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetAvailabilityZoneDetailsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapAvailabilityZoneDetailsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapAvailabilityZoneDetailsResult.DeserializeSapAvailabilityZoneDetailsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetAvailabilityZoneDetails(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetAvailabilityZoneDetailsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapAvailabilityZoneDetailsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapAvailabilityZoneDetailsResult.DeserializeSapAvailabilityZoneDetailsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs new file mode 100644 index 000000000000..ce15a8b6e1d0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapApplicationServerInstances method from an instance of . + /// + public partial class SapApplicationServerInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapApplicationServerInstanceClientDiagnostics; + private readonly SapApplicationServerInstancesRestOperations _sapApplicationServerInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapApplicationServerInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapApplicationServerInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapApplicationServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapApplicationServerInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapApplicationServerInstanceResource.ResourceType, out string sapApplicationServerInstanceApiVersion); + _sapApplicationServerInstanceRestClient = new SapApplicationServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapApplicationServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapApplicationServerInstanceOperationSource(Client), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapApplicationServerInstanceOperationSource(Client), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapApplicationServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapApplicationServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapApplicationServerInstanceResource(Client, SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(e)), _sapApplicationServerInstanceClientDiagnostics, Pipeline, "SapApplicationServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapApplicationServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapApplicationServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapApplicationServerInstanceResource(Client, SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(e)), _sapApplicationServerInstanceClientDiagnostics, Pipeline, "SapApplicationServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs new file mode 100644 index 000000000000..878eb1629965 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapApplicationServerInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerInstanceData(document.RootElement, options); + } + + internal static SapApplicationServerInstanceData DeserializeSapApplicationServerInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapApplicationServerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapApplicationServerProperties.DeserializeSapApplicationServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapApplicationServerInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs new file mode 100644 index 000000000000..cbf2c3802f58 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapApplicationServerInstance data model. + /// Define the SAP Application Server Instance resource. + /// + public partial class SapApplicationServerInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapApplicationServerInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapApplicationServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapApplicationServerInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapApplicationServerProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs new file mode 100644 index 000000000000..8949a7b78c7b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapApplicationServerInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs new file mode 100644 index 000000000000..09a7cb6fbf68 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs @@ -0,0 +1,871 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapApplicationServerInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapApplicationServerInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapApplicationServerInstance method. + /// + public partial class SapApplicationServerInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The applicationInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapApplicationServerInstanceClientDiagnostics; + private readonly SapApplicationServerInstancesRestOperations _sapApplicationServerInstanceRestClient; + private readonly SapApplicationServerInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/applicationInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapApplicationServerInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapApplicationServerInstanceResource(ArmClient client, SapApplicationServerInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapApplicationServerInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapApplicationServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapApplicationServerInstanceApiVersion); + _sapApplicationServerInstanceRestClient = new SapApplicationServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapApplicationServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapApplicationServerInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Application server instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Application server instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs new file mode 100644 index 000000000000..f4720665bca6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapCentralServerInstances method from an instance of . + /// + public partial class SapCentralServerInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapCentralServerInstanceClientDiagnostics; + private readonly SapCentralServerInstancesRestOperations _sapCentralServerInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapCentralServerInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapCentralServerInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapCentralServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapCentralServerInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapCentralServerInstanceResource.ResourceType, out string sapCentralServerInstanceApiVersion); + _sapCentralServerInstanceRestClient = new SapCentralServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapCentralServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapCentralServerInstanceOperationSource(Client), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapCentralServerInstanceOperationSource(Client), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances + /// + /// + /// Operation Id + /// SAPCentralServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapCentralServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapCentralServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapCentralServerInstanceResource(Client, SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(e)), _sapCentralServerInstanceClientDiagnostics, Pipeline, "SapCentralServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances + /// + /// + /// Operation Id + /// SAPCentralServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapCentralServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapCentralServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapCentralServerInstanceResource(Client, SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(e)), _sapCentralServerInstanceClientDiagnostics, Pipeline, "SapCentralServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs new file mode 100644 index 000000000000..01279ccef8f9 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapCentralServerInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerInstanceData(document.RootElement, options); + } + + internal static SapCentralServerInstanceData DeserializeSapCentralServerInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapCentralServerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapCentralServerProperties.DeserializeSapCentralServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapCentralServerInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs new file mode 100644 index 000000000000..e2b64daf7eee --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapCentralServerInstance data model. + /// Define the SAP Central Services Instance resource. + /// + public partial class SapCentralServerInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapCentralServerInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapCentralServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapCentralServerInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapCentralServerProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs new file mode 100644 index 000000000000..b133bd8eceef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapCentralServerInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs new file mode 100644 index 000000000000..80e3337f1da6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs @@ -0,0 +1,871 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapCentralServerInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapCentralServerInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapCentralServerInstance method. + /// + public partial class SapCentralServerInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The centralInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapCentralServerInstanceClientDiagnostics; + private readonly SapCentralServerInstancesRestOperations _sapCentralServerInstanceRestClient; + private readonly SapCentralServerInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/centralInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapCentralServerInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapCentralServerInstanceResource(ArmClient client, SapCentralServerInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapCentralServerInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapCentralServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapCentralServerInstanceApiVersion); + _sapCentralServerInstanceRestClient = new SapCentralServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapCentralServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapCentralServerInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs new file mode 100644 index 000000000000..838f24961510 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapDatabaseInstances method from an instance of . + /// + public partial class SapDatabaseInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapDatabaseInstanceClientDiagnostics; + private readonly SapDatabaseInstancesRestOperations _sapDatabaseInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapDatabaseInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapDatabaseInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapDatabaseInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapDatabaseInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapDatabaseInstanceResource.ResourceType, out string sapDatabaseInstanceApiVersion); + _sapDatabaseInstanceRestClient = new SapDatabaseInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapDatabaseInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapDatabaseInstanceOperationSource(Client), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapDatabaseInstanceOperationSource(Client), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances + /// + /// + /// Operation Id + /// SAPDatabaseInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapDatabaseInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapDatabaseInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapDatabaseInstanceResource(Client, SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(e)), _sapDatabaseInstanceClientDiagnostics, Pipeline, "SapDatabaseInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances + /// + /// + /// Operation Id + /// SAPDatabaseInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapDatabaseInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapDatabaseInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapDatabaseInstanceResource(Client, SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(e)), _sapDatabaseInstanceClientDiagnostics, Pipeline, "SapDatabaseInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs new file mode 100644 index 000000000000..6ee6544117fd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapDatabaseInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseInstanceData(document.RootElement, options); + } + + internal static SapDatabaseInstanceData DeserializeSapDatabaseInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDatabaseProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapDatabaseProperties.DeserializeSapDatabaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapDatabaseInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs new file mode 100644 index 000000000000..2a7a52a0a861 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapDatabaseInstance data model. + /// Define the Database resource. + /// + public partial class SapDatabaseInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapDatabaseInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapDatabaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapDatabaseInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapDatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs new file mode 100644 index 000000000000..7dea59643721 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapDatabaseInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs new file mode 100644 index 000000000000..7143c285d63a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs @@ -0,0 +1,871 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapDatabaseInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapDatabaseInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapDatabaseInstance method. + /// + public partial class SapDatabaseInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The databaseInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapDatabaseInstanceClientDiagnostics; + private readonly SapDatabaseInstancesRestOperations _sapDatabaseInstanceRestClient; + private readonly SapDatabaseInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/databaseInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapDatabaseInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapDatabaseInstanceResource(ArmClient client, SapDatabaseInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapDatabaseInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapDatabaseInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapDatabaseInstanceApiVersion); + _sapDatabaseInstanceRestClient = new SapDatabaseInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapDatabaseInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapDatabaseInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Database resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource update request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Database resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource update request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Database server instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// SAP Database server instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs new file mode 100644 index 000000000000..5544653d0006 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapVirtualInstances method from an instance of . + /// + public partial class SapVirtualInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private readonly SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapVirtualInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapVirtualInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapVirtualInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapVirtualInstanceResource.ResourceType, out string sapVirtualInstanceApiVersion); + _sapVirtualInstanceRestClient = new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapVirtualInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates a Virtual Instance for SAP solutions (VIS) resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a Virtual Instance for SAP solutions (VIS) resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapVirtualInstanceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapVirtualInstanceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), _sapVirtualInstanceClientDiagnostics, Pipeline, "SapVirtualInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapVirtualInstanceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapVirtualInstanceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), _sapVirtualInstanceClientDiagnostics, Pipeline, "SapVirtualInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs new file mode 100644 index 000000000000..1b7ef37e6f1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapVirtualInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + } + + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceData(document.RootElement, options); + } + + internal static SapVirtualInstanceData DeserializeSapVirtualInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapVirtualInstanceProperties properties = default; + SAPVirtualInstanceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapVirtualInstanceProperties.DeserializeSapVirtualInstanceProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SAPVirtualInstanceIdentity.DeserializeSAPVirtualInstanceIdentity(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSapVirtualInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs new file mode 100644 index 000000000000..23effb8e55dd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapVirtualInstance data model. + /// Define the Virtual Instance for SAP solutions resource. + /// + public partial class SapVirtualInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapVirtualInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapVirtualInstanceProperties properties, SAPVirtualInstanceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapVirtualInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapVirtualInstanceProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public SAPVirtualInstanceIdentity Identity { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs new file mode 100644 index 000000000000..bb21a27aa9a0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapVirtualInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs new file mode 100644 index 000000000000..7880898f8e6a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs @@ -0,0 +1,1086 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapVirtualInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapVirtualInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapVirtualInstance method. + /// + public partial class SapVirtualInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private readonly SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + private readonly SapVirtualInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapVirtualInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapVirtualInstanceResource(ArmClient client, SapVirtualInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapVirtualInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapVirtualInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapVirtualInstanceApiVersion); + _sapVirtualInstanceRestClient = new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapVirtualInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapVirtualInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of SapCentralServerInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapCentralServerInstanceResources and their operations over a SapCentralServerInstanceResource. + public virtual SapCentralServerInstanceCollection GetSapCentralServerInstances() + { + return GetCachedClient(client => new SapCentralServerInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapCentralServerInstanceAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapCentralServerInstances().GetAsync(centralInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapCentralServerInstance(string centralInstanceName, CancellationToken cancellationToken = default) + { + return GetSapCentralServerInstances().Get(centralInstanceName, cancellationToken); + } + + /// Gets a collection of SapDatabaseInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapDatabaseInstanceResources and their operations over a SapDatabaseInstanceResource. + public virtual SapDatabaseInstanceCollection GetSapDatabaseInstances() + { + return GetCachedClient(client => new SapDatabaseInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapDatabaseInstanceAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapDatabaseInstances().GetAsync(databaseInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapDatabaseInstance(string databaseInstanceName, CancellationToken cancellationToken = default) + { + return GetSapDatabaseInstances().Get(databaseInstanceName, cancellationToken); + } + + /// Gets a collection of SapApplicationServerInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapApplicationServerInstanceResources and their operations over a SapApplicationServerInstanceResource. + public virtual SapApplicationServerInstanceCollection GetSapApplicationServerInstances() + { + return GetCachedClient(client => new SapApplicationServerInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapApplicationServerInstanceAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapApplicationServerInstances().GetAsync(applicationInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapApplicationServerInstance(string applicationInstanceName, CancellationToken cancellationToken = default) + { + return GetSapApplicationServerInstances().Get(applicationInstanceName, cancellationToken); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start + /// + /// + /// Operation Id + /// SAPVirtualInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start + /// + /// + /// Operation Id + /// SAPVirtualInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop + /// + /// + /// Operation Id + /// SAPVirtualInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop + /// + /// + /// Operation Id + /// SAPVirtualInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..b7c755131425 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.SapVirtualInstances.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj new file mode 100644 index 000000000000..f8699f7486bb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj @@ -0,0 +1,12 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml new file mode 100644 index 000000000000..e3a082fbe0a9 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/workloads/Workloads.SAPVirtualInstance.Management +commit: ce46dc3e04b0bc3a7b04d9c715c1107186978a5c +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/workloadssapvirtualinstance/ci.mgmt.yml b/sdk/workloadssapvirtualinstance/ci.mgmt.yml new file mode 100644 index 000000000000..38845a1b0299 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/ci.mgmt.yml @@ -0,0 +1,24 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadssapvirtualinstance/ci.mgmt.yml + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: workloadssapvirtualinstance + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.SapVirtualInstances + safeName: AzureResourceManagerSapVirtualInstances